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.
>
> package com.foo.comet
>
> import net.liftweb._
> import http._
> import js._
> import JsCmds._
> import net.liftweb.util._
> import net.liftweb.http._
> import _root_.scala.xml._
> import scala.actors._
> import com.authoritude.snippet._
> import scala.collection.mutable.Queue
> import net.liftweb.http.SessionVar
>
> class MyComet extends CometActor {
>
>   override def defaultPrefix = Full("auth")
>
>   private var foos = FooManager.getFoos
>
>   def createDisplay(foos:List[Foo]):NodeSeq = {
>     <span id="go"><table>
>     {
>       for {foo <- foos} yield <tr><td>{foo.getValue}</td></tr>
>     }
>
>     </table></span>
>   }
>
>   def render = { bind("foo" -> createDisplay(foos)) }
>
>   override def localSetup = {
>     super.localSetup
>     this ! Tick
>   }
>
>   var foo:Foo = null
>   override def lowPriority = {
>     case Tick => {
>       foo=FooQueue.getLatest
>       if (foo!=null && foo.getValue > -1) {
>     blogs = FooManager.process(foo, foos)
>       } else if (foo!=null){
>     foos = foos.remove((f:Foo)=>(f.id==foo.id))
>       }
>       reRender(false)
>       this ! Tick
>     }
>   }
>
> }
>
> case class Tick
>
> On Sun, Nov 8, 2009 at 5:31 AM, Timothy Perrett 
> <timo...@getintheloop.eu>wrote:
>
>
>
>
>
> > Without posting your code it's going to be tough to help you.
>
> > Cheers, Tim
>
> > Sent from my iPhone
>
> > 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
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to