[Lift] Re: CometActor and render

2009-11-13 Thread Randinn
Ah, nice, just checking if you knew about it as an option. On Nov 13, 8:08 am, Jack Widman jack.wid...@gmail.com wrote: I did and its actually in the code I attached. In one place I use Dispatch and in another place I use httpclient directly. I intend to use Dispatch for everything. On

[Lift] Re: CometActor and render

2009-11-12 Thread Randinn
I'm not trying to change the subject but I was wondering if you looked at Databinder Dispatch http://databinder.net/dispatch/About for your url calls? On Nov 12, 3:26 pm, Jack Widman jack.wid...@gmail.com wrote: David, I have attached my code. It runs but does not behave as I intended it to.

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
I did and its actually in the code I attached. In one place I use Dispatch and in another place I use httpclient directly. I intend to use Dispatch for everything. On Thu, Nov 12, 2009 at 4:05 PM, Randinn rand...@gmail.com wrote: I'm not trying to change the subject but I was wondering if you

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Will do. One more small question How do I send a message to the Comet Actor from another class? Can the CometActor be an object instead of a class? In the code X ! messageToCometActor, what is X? I don't have a variable that holds the instance of the CometActor. On Thu, Nov 12, 2009 at 5:12

[Lift] Re: CometActor and render

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 2:16 PM, Jack Widman jack.wid...@gmail.com wrote: Will do. One more small question How do I send a message to the Comet Actor from another class? Can the CometActor be an object instead of a class? In the code Lift instantiates a new CometActor each time it needs one.

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Thanks. On Thu, Nov 12, 2009 at 5:32 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Nov 12, 2009 at 2:16 PM, Jack Widman jack.wid...@gmail.comwrote: Will do. One more small question How do I send a message to the Comet Actor from another class? Can the CometActor be an

[Lift] Re: CometActor and render

2009-11-12 Thread David Pollak
On Thu, Nov 12, 2009 at 2:25 PM, Jack Widman jack.wid...@gmail.com wrote: Is it that I am putting things on a Queue from within an the Calculator Actor and having the CometActor retrieve them from the Queue? Is that the problem? I will read up on actors but it would help if you could tell me

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
got it. I was mixing metaphors. On Thu, Nov 12, 2009 at 5:41 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Nov 12, 2009 at 2:25 PM, Jack Widman jack.wid...@gmail.comwrote: Is it that I am putting things on a Queue from within an the Calculator Actor and having the

[Lift] Re: CometActor and render

2009-11-11 Thread jack
one more thing: I also ran the code without the piece that retrieves web pages and gets their length. Instead I just had the Calculator class sleep for 10 seconds (which is longer than the http request takes) and then return a random number. This worked fine. I can't see what the difference is.

[Lift] Re: CometActor and render

2009-11-10 Thread Jack Widman
Sorry. Just reread my past post and it is indeed unclear. I will post running code tonight. I very much appreciate your help. On Tue, Nov 10, 2009 at 1:27 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman jack.wid...@gmail.comwrote: The only

[Lift] Re: CometActor and render

2009-11-09 Thread David Pollak
On Sun, Nov 8, 2009 at 11:28 PM, Jack Widman jack.wid...@gmail.com wrote: Thanks David. This is a big help. Can you tell me exactly how lowPriority, mediumPriorty and highPriority work? When are they called? When a message comes into the Actor's mailbox, the Actor determines if it can handle

[Lift] Re: CometActor and render

2009-11-09 Thread Jack Widman
The only difference between your working code and mine is that mine has a process in the background that is always running and puts Foo objects on a queue whenever they are ready. Where can I start this long running process so that it doesn't interfere with the lowPriority method that takes things

[Lift] Re: CometActor and render

2009-11-09 Thread David Pollak
On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman jack.wid...@gmail.com wrote: The only difference between your working code and mine is that mine has a process in the background that is always running and puts Foo objects on a queue whenever they are ready. Where can I start this long running

[Lift] Re: CometActor and render

2009-11-08 Thread jack
By the way, I know that when render is called, all the variables have the right values. I just don't see it on the screen unless I refresh it. On Nov 8, 3:12 am, jack jack.wid...@gmail.com wrote: I have a CometActor. render is called when it is supposed to be but I don't see the changes. If I

[Lift] Re: CometActor and render

2009-11-08 Thread Jack Widman
Sorry. Here it is: As I said, I know that when render is called, foo.getValue has the right value. But it does not show on the screen, unless I refresh the browser. package com.foo.comet import net.liftweb._ import http._ import js._ import JsCmds._ import net.liftweb.util._ import

[Lift] Re: CometActor and render

2009-11-08 Thread jack
One more thing. 'foo's get added to the FooQueue periodically. On Nov 8, 6:47 pm, Jack Widman jack.wid...@gmail.com wrote: Sorry. Here it is:   As I said, I know that when render is called, foo.getValue has the right value. But it does not show on the screen, unless I refresh the browser.

[Lift] Re: CometActor and render

2009-11-08 Thread David Pollak
Jack, I reproduced your code and it seems to work fine. I've enclosed a working copy. Some comments about your code: - The foos variable and the foo variable may be getting confused in the code... the render method may be rendering the same thing based on the unchanging foos variable.

[Lift] Re: CometActor and render

2009-11-08 Thread Jack Widman
Thanks David. This is a big help. Can you tell me exactly how lowPriority, mediumPriorty and highPriority work? When are they called? On Sun, Nov 8, 2009 at 11:35 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Jack, I reproduced your code and it seems to work fine. I've enclosed a