> > var anotherWidget = new AnotherWidget();
> > anotherWidget.addEventListener("changeSomething",
> > this._someHandler);
> >
> > When the handler gets triggered by a "changeSomething" event, the
> > alert
> > of the handler is being called. My problem is, that 'this' now
> > refers to
> > an object of class AnotherWidget and not to the instance of
> > MyWidget.
>
> Use:
>
> anotherWidget.addEventListener("changeSomething", this._handler,
> this);
This is now in the snippets at
http://qooxdoo.oss.schlund.de/snippets/problems-with-this-in-event-handlers
Hugh
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel