Andreas, I think it was because his browser security was blocking the event with a confirmation popup when it didn't come from a native click response, and he wanted to avoid the popup confirmation dialog by replicating the mouse click rather than running the code programmatically.
I could be mistaken, but I think that was stated in the original message to the ML. Thanks for confirming that this is a problem, though. Doesn't anyone have a workaround to get the mouse event to fire as it should? We have these event methods available in the framework, so why isn't there a way to get them to fire as intended in this instance? HTH, Gene On Mon, 2009-12-28 at 10:40 +0100, Fink, Andreas wrote: > Hi Ken, > > I must confirm, firing a event programmatically is a mystery of qooxdoo ☺ > Especially user events like mouse and key events. > But why you simply define your handler function like this (tested in > playground): > > 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 > myMouseupHandler = function(e) { > if (e instanceof qx.event.type.Event) { > alert("event fired by user!"); > } > else { > alert("handler invoked programmatically!"); > } > } > button1.addListener("mouseup", myMouseupHandler); > > //invoke mouseup handler programmatically > myMouseupHandler(); > > Regards, > Andreas > > Von: Ken MacDonald [mailto:drken...@gmail.com] > Gesendet: Donnerstag, 24. Dezember 2009 22:01 > An: qooxdoo-devel@lists.sourceforge.net > Betreff: Re: [qooxdoo-devel] artificially getting to a listener > > Hi Gene, > Still a mystery. I did find an interesting site with a wealth of general info > about the differences between FF and IE in event handling, and they have a > javascript package called "Unified Event Model" which attempts some > workarounds to make IE event handling much more Firefox-like, which in turn > is much more W3C-like. That site is: > > http://www.jslab.dk/projects.php > > However, I don't know how well qooxdoo would interact with UEM, as well as > how to automagically bring it in via fooling with generate.py, maybe. Also, > not sure if UEM even handles this particular event properly. > > That said, I second the idea of having more comprehensive doc around some of > the more complex areas, such as events. I like your "concise to the point..." > statement. Some real-life examples, even lifted from the test suite, would go > a long way toward making this stuff more understandable. > Ken > On Thu, Dec 24, 2009 at 3:45 PM, Gene Amtower <g...@pc-backup.com> wrote: > Ken, > > Did you ever figure this out yesterday? From trying to find the answer in > the manual, I think some additional knowledge and examples is needed in the > section on events - it's rather concise to the point of not being helpful. > Some examples in the manual would be helpful, as always. On the other hand, > something in the demo area would also be nice, as there's nothing there in > terms of programmatically firing an event. > > Anyone out there have example code of programmatically firing events on > widgets, where you actually got it to work? > > Thanks, > > Gene > > > On Wed, 2009-12-23 at 17:58 -0500, Ken MacDonald wrote: > Thanks Gene, > That gets rid of one bunch of errors. The event's init() method doesn't > document what the array should contain, or if it's even necessary, as it has > a null default - the fireEvent() doesn't toss errors now, but still doesn't > appear to work..... the listener for the 'mouseup' event is still not getting > called. > Ken > > On Wed, Dec 23, 2009 at 5:25 PM, Gene Amtower <g...@pc-backup.com> wrote: > Ken, > > Been messing around with this trying to help you sort it out, and in this > case I think you need a third parameter in qx.eventRegistration.fireEvent() > of qx.event.type.Mouse, as the default third parameter is > qx.event.type.Event, per the API. > > However, at that point you'll get another error because you also need to > provide an array of parameters for the event's Init() method, which I can't > figure out. > > Maybe this will get you closer to working it out. > > HTH, > > Gene > > ------------------------------------------------------------------------------ > > 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
------------------------------------------------------------------------------ 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