[Lift] Re: Giving an Actor access to S

2009-05-26 Thread marius d.
Hmmm ... object myVar extends SessionVar() val listener: Actor = actor { loop { react { case 'show = myCometActor ! SetMyVar(some value) } } } then have a CometActor that listens for this message and inside the Comet actor you already have access to the LiftSession, meaning

[Lift] Re: Giving an Actor access to S

2009-05-26 Thread Bryan.
Thanks. --Bryan On May 26, 11:33 am, David Pollak feeder.of.the.be...@gmail.com wrote: As long as you have access to the LiftSession, you can initialize S and use it correctly: case MyMessage = S.initIfUninitted(theSession) { ... code to execute in the actor scope } Thanks, David

[Lift] Re: Giving an Actor access to S

2009-05-26 Thread David Pollak
As long as you have access to the LiftSession, you can initialize S and use it correctly: case MyMessage = S.initIfUninitted(theSession) { ... code to execute in the actor scope } Thanks, David On Mon, May 25, 2009 at 11:39 AM, Bryan germ...@gmail.com wrote: How can I give an Actor access

[Lift] Re: Giving an Actor access to S

2009-05-25 Thread marius d.
CometActors are asynchronous components that live beyond the scope of a given request. From a CometActor you can have access to LiftSession or SessionVars meaning that you could potentially store the last- seen from the last request host name in a SessionVar an then access it anytime from your

[Lift] Re: Giving an Actor access to S

2009-05-25 Thread Timothy Perrett
My understanding was always that CometActor's faked S so its usage was fairly transparent of course, thats specific to CometActors and wont wash with a normal scala.actor.Actor etc Cheers, Tim On May 25, 10:01 pm, marius d. marius.dan...@gmail.com wrote: CometActors are asynchronous

[Lift] Re: Giving an Actor access to S

2009-05-25 Thread marius d.
Well and S object is initiated but in an asynchronous operation you wont really have request information cause you are beyond a request scope. Some things from S maybe available at that time. Br's, Marius On May 26, 1:42 am, Timothy Perrett timo...@getintheloop.eu wrote: My understanding was