Hi Alexei,

I see nothing wrong with your code. I have no idea why you see this 
behavior. Maybe it has something to do with your caching configuration. 
Does it also happen if you completely disable caching in your browser? 
Just a wild guess.

Best Fabian
> Hi,
>
> I'm new to qooxdoo and web app development in general. I'm using
> qooxdoo 0.8.2 on Windows XP SP3 with Python 2.5.2.
>
> I'm trying to figure out how to use qooxdoo with the web2py Python
> based framework on the server side.
>
>  I'm using the native jsonrpc service provided by web2py. I've managed
> to make them work together but there's something I don't understand.
>
> I have a test qooxdoo application with 2 buttons and 2 labels. Each
> button has a listener that sends a JSON-RPC request to the web2py
> backend and receives a response.
>
> You can see it in action here:
> http://phonetizer.com/qooxdoo/
>
> Both listeners work fine - I can send a request and receive a response
> and then assign it to the corresponding label content.
>
> What I don't understand is why the second listener sometimes stops
> working after I rebuild the application, and to make it work I have to
> change variable names in it (say, var handler to var handler2, or var
> rpc to var rpc2). When it stops working clicking the corresponding
> button just makes it appear pressed for 5 to 10 seconds and then
> nothing happens.
>
> Here's the relevant source code:
>
> // Add button to document at fixed coordinates
>       doc.add(button1, {left: 100, top: 50});
>       doc.add(button2, {left: 100, top: 120});
>       doc.add(label1, {left: 100, top: 200});
>       doc.add(label2, {left: 100, top: 250});
>
>       // Add an event listener
>       button1.addListener("execute", function(e) {
>
>         var rpc = new qx.io.remote.Rpc(
>          "http://phonetizer.com/qooxdoo/default/call/jsonrpc";,
>          "");
>
>         // asynchronous call
>         var handler = function(result, exc) {
>         if (exc == null) {
>             label2.setContent(result);
>         } else {
>             alert("Exception during async call: " + exc);
>         }
>         };
>         rpc.callAsync(handler, "test");
>
>       });
>
>       button2.addListener("execute", function(e) {
>
>       var rpc = new qx.io.remote.Rpc(
>          "http://phonetizer.com/qooxdoo/default/call/jsonrpc";,
>          "");
>
>         // asynchronous call
>         var handler = function(result, exc) {
>         if (exc == null) {
>             label1.setContent(result[0][0]);
>         } else {
>             alert("Exception during async call: " + exc);
>         }
>         };
>         rpc.callAsync(handler, "getTasks");
>
>
>       });
>
>   


-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[email protected]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to