If you just want to track the change of the textfield value you have to
add the eventlistener for
"changeValue".
"changeValue" just fires if the textfield looses focus.
And as David said: please have a look at the demos e.g.:
http://demo.qooxdoo.org/sample/html/example/Fields_1.html
shows the usage of the "changeValue" and "input" event.
Matthias Reuter schrieb:
I thought there might be an easier way to do this. With html, I'd do
something like
<input type="text" onchange="javascript:doSomething()">
The natural way to handle this with qooxdoo I thought, was
myTextField.addEventListener("change", doSomething, this);
Thus, I'd only need one function doSomething. Now I need
doSomethingWhenButtonIsClicked and doSomethingWhenKeyIsPressed.
So, as I see it, I could
a) listen for input and check, if return has been pressed
b) or do something like
myTextField.addHtmlProperty("onchange",
"javascript:doSomething()");
c) or write my own TextField class, which listens to the change event.
Clearly, you must attach a key event to the textfield, and
when the enter key is pressed, you must dispatch an execute
event to the button.
You have many examples of keyboard processing in the qooxdoo
source code.
The doc explains also this.
Matthias Reuter wrote:
In my application, I have a TextField and a Button. When either the
TextField is focused and enter/return is pressed or the Button is
clicked, I want some action to happen, so I added an eventlistener.
What exactly is the event for the TextField I have to listen to? It's
not "input", I don't want to monitor every character typed in. It's
not "execute", which works fine for the Button.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Mit freundlichen Grüßen
Dietrich Streifert
Visionet GmbH
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel