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"); }); -- Alexei Vinidiktov ------------------------------------------------------------------------------ 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
