On Tue, Sep 22, 2009 at 1:37 PM, Xavi Ramirez <[email protected]> wrote:
> > Hello, > > I'm trying to implement a member list for a chat application. The > member list is implemented as a comet actor which receives message > when users visit and leave the chat page. > > Currently I detect when a user visits the page by executing a js > function called "joinChat" near the bottom of the page. When > executed, "joinChat" calls (via ajaxInvoke) a scala method that > notifies a list of comet actors that a new visitor has arrived. This > works great. > > Unfortunately, I'm having trouble detecting when users leave the chat > page. I've tried using the window.onbeforeunload method, but there is > an outstanding bug in chrome > (http://code.google.com/p/chromium/issues/detail?id=11666) and Opera > which prevent ajax calls from being sent in onbeforeunload. > > I've also tried setting the comet actor's lifespan to 5 seconds, but > that seems to destroy comet actors once they've been idle for 5 > seconds. > > Are there any other mechanisms in lift that could help me solve this > problem. Perhaps, there is some way to hook into the "keepAlive" > signal that lift uses for comet actors? Lemme see what I can do. Please open a ticket for this (we're doing changes via tickets). I'll see if I can get to it today. > Or maybe there's a setting > that makes lift destroy comet actors as soon as they don't appear on a > page? > > Thanks, > Xavi > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
