Hi, rsantiagopaz schrieb: > with this little example I need ask 2 questions: > > 1) First, you must double-click in all 15 items from the first list. > Observe the behavior. Why second and third list have different behavior? > > Is only for curiosity. I was a problem until I detect this little extrange > behavior. That's a bug, the two lists should have the same behavior. I filed a report for it: http://bugzilla.qooxdoo.org/show_bug.cgi?id=4344 > > > 2) What is the correct form for fireEvent "dblclick" with the button? I get > a error and I cant understand why. qx.event.type.Mouse needs to be initialized with an actual browser event. You could fake that, but unless you really want to simulate a user interacting with your application, it's not worth it. If you want your button to trigger the same behavior as double clicking the list, just define the behavior in a member function and use that as the callback for both the list's "dblclick" event and the button's "execute" event. > > Y use qooxdoo 1.2. > > > > > > var doc = this.getRoot(); > > var list1 = new qx.ui.form.List(); > list1.addListener("dblclick", function(e){ > var listItem = list1.getSelection()[0]; > list1.remove(listItem); > list3.add(listItem); > list3.setSelection([listItem]); > > var listItem2 = new qx.ui.form.ListItem(listItem.getLabel()); > list2.add(listItem2); > list2.setSelection([listItem2]); > }); > doc.add(list1, {left: 20, top: 20}); > var list2 = new qx.ui.form.List(); > doc.add(list2, {left: 220, top: 20}); > var list3 = new qx.ui.form.List(); > doc.add(list3, {left: 420, top: 20}); > > for (var x = 0; x < 15; x++) { > listItem = new qx.ui.form.ListItem("item" + x); > list1.add(listItem); > } > > var button = new qx.ui.form.Button("fireEvent dblclick"); > button.addListener("execute", function(e){ > try { > list1.fireEvent("dblclick", qx.event.type.Mouse);; > } catch (ex) { > alert(ex); > } > }); > doc.add(button, {left: 20, top: 250});
Regards, Daniel ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
