Another Solution would be to save the TextArea instance with setUserData inside
the button:
var txt = new qx.ui.form.TextArea();
var btn = new qx.ui.form.Button("btn", "icon/22/apps/internet-web-browser.png");
btn.setUserData("myTextArea", txt);
btn.addListener("execute", function(e) {
alert(e.getTarget().getUserData("myTextArea").getValue());
//this.__saveDataToDB();
}, this);
I just hacked this code inside the email, it's not tested but should work ;)
Regards,
Andreas
Von: fei wang [mailto:[email protected]]
Gesendet: Dienstag, 14. Mai 2013 16:45
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] Any one can help ?
Thanks very much!
It's OK to bind listener to correct text area.
BUT, Another question :
-------------------
...
var txt = new qx.ui.form.TextArea();
var btn = new qx.ui.form.Button("btn",
"icon/22/apps/internet-web-browser.png");
btn.addListener("execute", function(e) {
alert(this.getValue());
// In Here,
// If bind listener to 'txt', not 'this', How to call the APP instance
method, such as '__saveDataToDB()' ?
}, txt);
...
--------------------
On Tue, May 14, 2013 at 6:30 PM, Fink, Andreas <[email protected]>
wrote:
Sorry, wrong url. This one should do the job ;)
http://tinyurl.com/br8aq67
-----Ursprüngliche Nachricht-----
Von: Fink, Andreas [mailto:[email protected]]
Gesendet: Dienstag, 14. Mai 2013 11:57
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] Any one can help ?
Hi,
your variable txt holds only the last reference your loop creates.
One way to do what you want is binding the listener context to the correct text
area:
http://tinyurl.com/cknuoe4
Regards,
Andreas
Von: fei wang [mailto:[email protected]]
Gesendet: Dienstag, 14. Mai 2013 08:36
An: qooxdoo Development
Betreff: [qooxdoo-devel] Any one can help ?
http://tinyurl.com/bwwcfru
In my sample, do follow step:
1) select 'A' tab
2) enter 'hello' string in TextArea
3) click 'btn' button
My question is :
why the alert dialog show the 'null' string?
If I want to show 'hello' string in alert dialog, how should I do?
Thanks,
Wang Feiku
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel