[Lift] Re: Feature Request: Add S.findComet(theType: String, name: String): Option[CometActor]

2009-09-06 Thread Xavi Ramirez

I didn't realize that a list of one item could be turned into a Box directly.

Thanks for the tip.

-Xavi

On Sun, Sep 6, 2009 at 10:37 AM, marius d. wrote:
>
> Is this too inconvenient ?
>
> val myComet = Box(findComet("myType").filter(_.name == "myname"))
>
> I have nothing against your proposal except it should return a Box not
> an Option.
>
> Br's,
> Marius
>
> On Sep 6, 6:17 am, Xavi Ramirez  wrote:
>> Hello,
>>
>> Would it be possible to add the following findComet override to LiftSession?
>>
>> def findComet(theType: String, name: String): Option[CometActor] =
>>   synchronized { asyncComponents get (theType, name) } // I'm not sure
>> if this is the correct implementation, but you get the idea
>>
>> I'd like to be able to get hold of a specific CometActor without
>> storing it in a session variable.
>>
>> Thanks,
>> Xavi
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Feature Request: Add S.findComet(theType: String, name: String): Option[CometActor]

2009-09-06 Thread marius d.

Is this too inconvenient ?

val myComet = Box(findComet("myType").filter(_.name == "myname"))

I have nothing against your proposal except it should return a Box not
an Option.

Br's,
Marius

On Sep 6, 6:17 am, Xavi Ramirez  wrote:
> Hello,
>
> Would it be possible to add the following findComet override to LiftSession?
>
> def findComet(theType: String, name: String): Option[CometActor] =
>   synchronized { asyncComponents get (theType, name) } // I'm not sure
> if this is the correct implementation, but you get the idea
>
> I'd like to be able to get hold of a specific CometActor without
> storing it in a session variable.
>
> Thanks,
> Xavi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---