Hoping that would do it, but I have been trying to get fireEvent() or dispatchEvent(), or fireNonBubblingEvent() ... and a dozen other things ... to work for a couple of weeks now; either they are broken or I'm not invoking them correctly. Does anyone know how to get fireEvent() to work for a 'mouseup' event? I've tried to do this:
qx.event.Registration.fireEvent(button1, 'mouseup'); but it logs a traceback indicating that it's not a qx.event.type.Mouse, and the listener is not invoked? log: Expected event type to be instanceof 'qx.event.type.Mouse' but found 'qx.event.type.Event' Ken On Wed, Dec 23, 2009 at 4:49 PM, Fritz Zaucker <fritz.zauc...@oetiker.ch>wrote: > fireEvent? > > Cheers, > Fritz > > -- > Fritz Zaucker > Oetiker+Partner AG > Aarweg 15 > CH-4600 Olten > +41 62 755 9903 > > On 23.12.2009, at 21:51, Ken MacDonald <drken...@gmail.com> wrote: > > > I'm beginning to think that there is no way to do this in qooxdoo: > > > > create a widget > > add a listener to that widget for an event, e.g. "mouseup" > > somehow trigger that listener programmatically instead of physically > > clicking the widget with the mouse > > > > var button1 = new qx.ui.form.Button("First Button", "icon/22/apps/ > > internet-web-browser.png"); > > // Document is the application root > > var doc = this.getRoot(); > > // Add button to document at fixed coordinates > > doc.add(button1, > > { > > left : 100, > > top : 50 > > }); > > // Add an event listener > > button1.addListener("mouseup", function(e) { > > alert("Hello World!"); > > }); > > alert('foo'); > > var e = new qx.event.type.Mouse(); > > button1.dispatchEvent(e); > > > > I would expect that with some variation of code like this, the > > button1 listener function would be invoked. Has anyone out there > > succeeded in invoking an event handler programmatically? > > Ken > > --- > > --- > > --- > > --------------------------------------------------------------------- > > This SF.Net email is sponsored by the Verizon Developer Community > > Take advantage of Verizon's best-in-class app development support > > A streamlined, 14 day to market process makes app distribution fast > > and easy > > Join now and get one step closer to millions of Verizon customers > > http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > > qooxdoo-devel mailing list > > qooxdoo-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel