The close function probably is called with the wrong context. When you attach 
your event listener, always make sure you supply the correct object as the 3rd 
parameter (self):

 

    someObject.addListener("close", this.close, this);

 

This will make sure that when "someObject" fires the "close" event, the close 
method is run. Now you can use this._var like in your example, because in the 
close method, "this" will refer to the entire object.

 

Regards,

Marc
 
-----Original message-----
To:[email protected]; 
From:689137 <[email protected]>
Sent:Tue 20-11-2012 19:29
Subject:[qooxdoo-devel] Qooxdoo Close Event
Hi,

I have a question related to qooxdoo close event.
I am aware of fact that I can catch and add code to this event as follows:
members :
 {
       _var : null,
 close: function() {
         //code goes here
         alert(this._var); //shows null no matter what value I assign it in
the "main" function of the app
       }
   ...
  }
The problem I am facing is that when I try to use _var variable's value, it
is null no matter what value I assigned it during the execution of my web
application. Can anyone point me a way how to preserve that value, or some
workaround to catch that value before it is lost?

Thank you in advance!



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Qooxdoo-Close-Event-tp7582052.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to