Hi,

On Friday 08 January 2010 09:14:40 Qoodary wrote:
> <<var data = res.getData();
> <<var content = data["result"];
> 
> This does not change anything in my example.
> I am wondering that the first "alert"
> alert(e.getContent());
> works fine, and I can see the result from database.
> But then nothing happens. The other alerts are not working.
> But why?
> ----------------------------------
>  var req = new qx.io.remote.Request(
>                "http://localhost/PA/MobileWebJobTicket/data.php";,
>                "GET",
>               "text/plain");
> 
>             req.addListener("completed", function(e) {
>                 alert(e.getContent());
> 
>                 var content = e.getData().getContent();
>               alert(content);
>               var tabledata = qx.io.Json.parse(content);
>               alert(tabledata);
>               tableModel.setData(tabledata);
>             });
> ---------------------------------
The result of the "getContent" method is an instance of 
"qx.io.remote.Response" which is a subclass of "qx.event.type.Event". This 
class does NOT have a "getData" method as the "qx.event.type.Data" class has.

So the wrong line is 

--snip--
var content = e.getData().getContent();
--snip--

in your example. This stops the script from being interpreted further.

See the API Viewer for more details of the "qx.io.remote.Response" class
-> http://demo.qooxdoo.org/current/apiviewer/#qx.io.remote.Response

cheers,
  Alex

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to