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.
> 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.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 process
> >> so that it doesn't interfere with the lowPriority method that takes things
> >> off the queue and rerenders the page. I tried starting the process in its
> >> own Actor that I start in localSetup but it seems somehow to be blocking the
> >> lowPriority method from doing its thing.
>
> > I have no idea what this means... sorry.
>
> > Please post actual runnable code and we can help you debug.
>
> >> 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
> >>> 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.
> >>> - Doing null testing is a sign that you have logic errors in your
> >>> code. I strongly recommend using either Box or Option for everything that
> >>> can logically not contain a value/reference. If you're bridging out to Java
> >>> code and are expecting null from the Java code, write a small bridge that
> >>> will wrapper the Java return values in Box/Option.
> >>> - You have a case class (Tick) that contains no parameters. Please
> >>> use a case object instead.
> >>> - Your Tick look is a spin loop. You fire a Tick message as part of
> >>> processing the Tick message. I would suggest that if you're polling, that
> >>> you have a reasonable poll interval, otherwise you'll starve your CPU.
> >>> Further, having reRender on each loop through means that you're forcing a
> >>> lot of bytes over the wire rather than only doing a reRender on changed
> >>> values.
>
> >>> Thanks,
>
> >>> David
>
> >>>>> On 8 Nov 2009, at 08:14, jack <
jack.wid...@gmail.com> wrote:
>
> >>>>> > 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 refresh the page at anytime, I do see
> >>>>> the
> >>>>> >> changes. Any idea what might cause this?
>
> >>>> --
> >>>> Jack Widman
>
> >>>> co-founder / cto, Authoritude, Inc.
>
> >>>>
203-641-9355
>
> >>> --
> >>> Lift, the simply functional web frameworkhttp://
liftweb.net
> >>> Beginning Scalahttp://
www.apress.com/book/view/1430219890
> >>> Follow me:
http://twitter.com/dpp
> >>> Surf the harmonics
>
> >> --
> >> Jack Widman
>
> >> co-founder / cto, Authoritude, Inc.
>
> >>
203-641-9355
>
> > --
> > Lift, the simply functional web frameworkhttp://
liftweb.net
> > Beginning Scalahttp://
www.apress.com/book/view/1430219890
> widman.tgz
> 187KViewDownload