Right...

I haven't tried / tested anything yet... This was just for  
illustration and nothing more.

Cheers, Tim

Sent from my iPhone

On 12 Jul 2009, at 21:58, Naftoli Gugenhem <[email protected]> wrote:

>
> Why are you mapping it, and why are you opening it, and why are you  
> using a default of Empty? Assignment returns Unit so you will get a  
> Full(()) or Empty. Then openOr Empty will give you a unit or Empty  
> box. Why not just use for or foreach?
>
> -------------------------------------
> Timothy Perrett<[email protected]> wrote:
>
>
> Awesome - thanks Marius! A hacky solution well avoided!!
>
> Cheers, Tim
>
> Sent from my iPhone
>
> On 12 Jul 2009, at 21:17, "marius d." <[email protected]> wrote:
>
>>
>>
>>
>> On Jul 12, 10:46 pm, Timothy Perrett <[email protected]> wrote:
>>> Thats interesting... I wasn't aware of that...
>>>
>>> However, even now knowing that its possible to implement them for  
>>> the
>>> session, how would one then set my function into the current  
>>> session?
>>> Perhaps something like:
>>>
>>> S.session.map(_.progessListener = { ... }).openOr(Empty)
>>
>> yup .... I assume you would set this when your upload progress actor
>> starts ... say in localSetup() ...
>>
>>>
>>> Cheers, Tim
>>>
>>> On Jul 12, 8:23 pm, "marius d." <[email protected]> wrote:
>>>
>>>> Why not use the progessListener from the LiftSession ?
>>>
>>>> Br's,
>>>> Marius
>>>
>>>> On Jul 12, 9:57 pm, Timothy Perrett <[email protected]>  
>>>> wrote:
>>>
>>>>> Hey guys,
>>>
>>>>> Implementing this upload progress widget with comet, I just
>>>>> wanted a
>>>>> quick sense check about how to organize things.
>>>
>>>>> As the CometActor for a particular session will be instantiated
>>>>> adhoc,
>>>>> and the LiftRules.progessListener is global, my current thinking
>>>>> is to
>>>>> register a given comet actor with a singleton manager actor upon
>>>>> its
>>>>> instantiation. Giving a progressListener something like:
>>>
>>>>> LiftRules.progessListener = (pBytesRead, pContentLength, pItems)
>>>>> => {
>>>>>  UploadProgressManager ! StatusUpdate(
>>>>>    S.session.map(_.uniqueId).openOr("default"),
>>>>>    pBytesRead, pContentLength, pItems)
>>>
>>>>> }
>>>
>>>>> The idea being that when comet actors register with the manager
>>>>> actor
>>>>> they give there sessionId and then I can ensure that only upload
>>>>> progress for the current session goes to a given user (and user B
>>>>> doesnt get user A's upload progress).
>>>
>>>>> However, I cant help but feel this is a little messy? Thoughts?
>>>
>>>>> Cheers, Tim
>>>
>>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to