Hi, On Wednesday 28 September 2011 12:33:54 ksadil wrote: > I am running the following code on the php rpc server to read data from a > database: > > function method_getData($params, $error) > { > $dbhandle = sqlite_open('filename2.sqlite'); > $result = sqlite_array_query($dbhandle, 'SELECT requests > FROM tablename', SQLITE_ASSOC); > sqlite_close($dbhandle); > return $result ; > } > > and calling it with this client code: > > // asynchronous call > var handler = function(result, exc) { > if (exc == null) { > alert("Result of async call: " + result); > } else { > alert("Exception during async call: " + exc); > } > }; > rpc.callAsync(handler, "getData"); > > The result in the alert is like "object Object". If I return only one row > to the client, the data is displayed correctly. Do I need to pre-process > the $result somehow before sending? I'm no qooxdoo-RPC expert, but I think if the result from your server is JSON this gets automatically parsed by the transport layer. Did you already output the result with Firebug (using the "console" object)?
This way you should get a better overview of what the result object is. Additionally you can use the "Network" tab of Firebug to analyze the HTTP response. Regards, Alex ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel