On Sun, Jul 20, 2008 at 10:17 AM, jhonny thio <[EMAIL PROTECTED]> wrote:
> Hi, i have one question
>
> This is my code :
>
> label = new qx.ui.toolbar.Button("Test");
> this.add(label);
> label.setUserData("id",1);
> label.addEventListener("execute", this._onPilihKat, this);
>
The third parameter to addEventListener is the object which will become
'this' in the callback function. It can be omitted, and the object on which
addEventListener() was called will be substituted. That would allow you to
access the label object as 'this' in the callback. You could also
explicitly pass 'label' as the third parameter to addEventListener(), which
is the same as omitting the third parameter.
> _onPilihKat : function()
> {
> how to access the label object here? example : how to get the
> userdata("id")?
>
If you either omitted the third parameter to addEventListner() or explicitly
passed 'label' then you could here reference this.getUserData("id")
Derrell
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel