What is happening is that you are getting your scope confused. If I
read your code I have no idea what your intent is for this.data. Are
you intending the data to be a property of the req? Well, it is. What
you probably want is for the data to be associated with another
object. To do that, you need to pass that other object in to the
method like this:
var myObj = {};
var req = new qx.io.remote.Request("http://localhost:8080/jlogin/", "GET",
"application/json");
req.addListener("completed", function(e) {
alert("completed: " + e.getContent());
this.data = e.getContent();
}, myObj);
This way, the data is now part of myObj and not part f req.
I hope that helps.
Jim
On Fri, Apr 15, 2011 at 12:01 AM, tero.lemmetyinen
<[email protected]> wrote:
> Hi,
>
> When request is completed how can I put content to a class member?
>
> for example, this.data = e.getContent(); seems to work but when I access it
> form another class data is not set.
>
> var req = new qx.io.remote.Request("http://localhost:8080/jlogin/", "GET",
> "application/json");
>
> req.addListener("completed", function(e) {
> alert("completed: " + e.getContent());
> this.data = e.getContent();
> });
>
>
> Thanks
> Tero
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel