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 that
you can just set your session var.
If you don't like the CometActor approach you'll have to provide the
LiftSession reference to your actor ... depending of course when you
are starting your actor.
As an example:
// somewhere in a snippet or a user processing function that is
already in the context of S
...
val listener: Actor = actor {
val ownSession = S.session
loop {
react {
case 'show => S.initIfUninitted(ownSession) {
myVar("some value")
}
}
}
...
Br's,
Marius