[Lift] Re: JavaScript interface to Comet

2009-06-01 Thread marius d.
On Jun 1, 2:59 am, Xavi Ramirez xavi@gmail.com wrote: Thanks for pointing me into the right direction.  I've created a simple example (see attachment).  In my example, the user can drag a div around the screen.  Every time the div moves, the browser sends a json object with the x and y

[Lift] Re: JavaScript interface to Comet

2009-06-01 Thread marius d.
Sorry hit send too soon ... continuation below On Jun 1, 10:42 am, marius d. marius.dan...@gmail.com wrote: On Jun 1, 2:59 am, Xavi Ramirez xavi@gmail.com wrote: Thanks for pointing me into the right direction.  I've created a simple example (see attachment).  In my example, the user

[Lift] Re: JavaScript interface to Comet

2009-06-01 Thread Xavi Ramirez
Ahh thanks. I forget to wrap my script with ![CDATA[]]. Also, thanks for the working example. =] Adding the session variable did fix the echoing issue I was seeing, for the most part. As for my second problem, I still saw performance issues even when using a chrome/firefox combination. I've

[Lift] Re: JavaScript interface to Comet

2009-05-31 Thread marius d.
Yes looks like this is exactly what you would need. Please see partialUpdate from CometActor. As an example you can see sites/example/ src/main/scala/net/liftweb/example/comet/Clock.scala. partialUPdate function returns a JsCmd but there are of course implicit conversions between JsExp and JsCmd.

[Lift] Re: JavaScript interface to Comet

2009-05-30 Thread marius d.
Lift generates the JavaScript for Comet so you essentially don't have to worry about it. From a CometActor you just provide the markup that you need to render asynchronously or just the JsExp to be executed by browser. However could you please provide an overview of what you're trying to

[Lift] Re: JavaScript interface to Comet

2009-05-30 Thread Xavi Ramirez
I'm trying add some comet features to an existing JS app. Essentially, I want to drag/drop a widget and have my movements reflected on other user's browsers. You mentioned that a CometActor can cause JsExp to be executed. This might be what I'm looking for. How does that work? Thanks, Xavi