sNIk schrieb:
> hello there. i have the following class for login. (simplified)
>
>
> ------------------------------------------------------------------------------------------------------
>
> qx.Class.define("qxgui.layout.LoginWindow",
> {
> extend: qx.core.Object,
> type: "singleton",
>
> construct : function()
> {
> this.__widgets = {};
>
> // labels
> ...
>
> // input-felder
> ...
>
> // button
> ...
>
> this.__widgets["okbutton"].addListener( "click", function(e)
> {
> alert(this.__widgets["namefield"].getValue());
> });
>
> this.__createWindow();
> },
>
>
You have to pass "this" as third parameter to the "addListener" call.
Otherwise the event system doesn't know which context (= the value of
"this") should be used to call the listener. In this case it falls back
to the event target, which is the "okbutton".
Best Fabian
--
Fabian Jakobs
JavaScript Framework Developer
1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[email protected]
Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel