Re: [qooxdoo-devel] 2 little question about List
I read that. Early read this example too http://www.mail-archive.com/[email protected]/msg27791.html I figure my code must be similar. I procede to trial-and-error I try all variants list1.fireEvent("dblclick", qx.event.type.Mouse, [{}, list1, list1, false, true]); list1.fireEvent("dblclick", qx.event.type.Mouse, [{}, list1, list1, false, false]); list1.fireEvent("dblclick", qx.event.type.Mouse, [{}, list1, null, false, true]); list1.fireEvent("dblclick", qx.event.type.Mouse, [{}, list1, null, false, false]); list1.fireEvent("dblclick", qx.event.type.Mouse, [{}, null, null, false, false]); ... ... but dont work, I get error. You can see clearly I dont understand the '{}', event nativeEvent parameter (??¿¿) . Sure is a mistake, but I cant understand this details. ..A simple correction to my example, that will be a great help... -- View this message in context: http://qooxdoo.678.n2.nabble.com/2-little-question-about-List-tp5751542p5752685.html Sent from the qooxdoo mailing list archive at Nabble.com. -- 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
Re: [qooxdoo-devel] 2 little question about List
rsantiagopaz schrieb: > thank you Daniel. > > About 2, yes, I know how work with that variant. > My objective with this simplified example is to learn work correctly with > all fireEvents, and particularly learn to avoid this error in dblclick, for > example. I figure I must use the 'args' third parameter to initialize the > Mouse event, but I cant find documentation. You know where I can find it? > Thanks. 'args' is what the event's 'init' method is called with. In this case: http://demo.qooxdoo.org/current/apiviewer/index.html#qx.event.type.Mouse~init 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
Re: [qooxdoo-devel] 2 little question about List
thank you Daniel. About 2, yes, I know how work with that variant. My objective with this simplified example is to learn work correctly with all fireEvents, and particularly learn to avoid this error in dblclick, for example. I figure I must use the 'args' third parameter to initialize the Mouse event, but I cant find documentation. You know where I can find it? Thanks. -- View this message in context: http://qooxdoo.678.n2.nabble.com/2-little-question-about-List-tp5751542p5752489.html Sent from the qooxdoo mailing list archive at Nabble.com. -- 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
Re: [qooxdoo-devel] 2 little question about List
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
