I would like to store async result into a global variable when calling callRpcGetDir function as in:
qx.Class.define("riveware.Application",{ extend : qx.application.Standalone, members : { user : null, rtemp: null, ... callRpcGetDir : function () { var rpc = new qx.io.remote.Rpc(); rpc.setTimeout(10000); rpc.setUrl("http://athens.isr.umich.edu/iveware/services/index.php"); rpc.setServiceName("qooxdoo.iveware"); rpc.setCrossDomain(true); var that = this; this.RpcRunning = rpc.callAsync( function(result, ex, id) { that.RpcRunning = null; if (ex == null) { this.rtemp = qx.util.Json.parse(result); } else { alert("Async(" + id + ") exception: " + ex + "code: " + ex.code); } }, "dirtemp", user); }, ... cmd_refresh.addListener("execute", function(e) { this.callRpcGetDir(); alert( this.rtemp); },this); req.send(); .... result returns an ok value but this.rtemp remains as null. Any workaround for this? -- View this message in context: http://qooxdoo.678.n2.nabble.com/Storing-Async-Result-tp6002298p6002298.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel