Hi!
My home automation (KNX-based) client app. is almost finished, and works fine. To improve the design, I would like to know if it is possible to avoid the 'changeValue' event to be triggered when I set a new value from the code (using toggle.setValue())? I would like this event to be triggered only when the user *clicks* on the toggle, from the GUI... Thanks, -- Frédéric ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
I had a similar problem and solved it by listening to the click event
instead of the changeValue event. Inside the click event handler you can use getValue() to get the new value. Cheers, Fritz On Fri, 13 Nov 2015, Frédéric wrote: > Hi! > > My home automation (KNX-based) client app. is almost finished, and works > fine. > > To improve the design, I would like to know if it is possible to avoid the > 'changeValue' event to be triggered when I set a new value from the > code (using toggle.setValue())? I would like this event to be triggered > only when the user *clicks* on the toggle, from the GUI... > > Thanks, > > -- > Frédéric > > ------------------------------------------------------------------------------ > _______________________________________________ > qooxdoo-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel Oetiker+Partner AG tel: +41 62 775 9903 (direct) Fritz Zaucker +41 62 775 9900 (switch board) Aarweg 15 +41 79 675 0630 (mobile) CH-4600 Olten fax: +41 62 775 9905 Schweiz web: www.oetiker.ch ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
Le 13/11/2015, Fritz a écrit :
> I had a similar problem and solved it by listening to the click event > instead of the changeValue event. Inside the click event handler you can > use getValue() to get the new value. Clever! Thanks :o) -- Frédéric ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
In reply to this post by fritz
Le 13/11/2015, Fritz a écrit :
> I had a similar problem and solved it by listening to the click event > instead of the changeValue event. Inside the click event handler you can > use getValue() to get the new value. I tried to implement something similar for the slider, to avoid sending notifications while moving the cursor. This time, I binded the 'mouseup' signal. It works fine, except if I release the button while the mouse is not above the slider anymore... Any idea to trigger an event when I release the button, in any case? Thanks, -- Frédéric ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
Hi Frédéric,
from what i see in https://github.com/qooxdoo/qooxdoo/blob/master/framework/source/class/qx/ui/form/Slider.js#L91 you should maybe liste for the 'losecapture' event: http://tinyurl.com/q7kthf7 Am 13.11.2015 um 13:56 schrieb Frédéric: > I tried to implement something similar for the slider, to avoid > sending notifications while moving the cursor. This time, I binded the > 'mouseup' signal. It works fine, except if I release the button while > the mouse is not above the slider anymore... Any idea to trigger an > event when I release the button, in any case? Thanks, ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
Le 13/11/2015, Dietrich a écrit :
> from what i see in > > https://github.com/qooxdoo/qooxdoo/blob/master/framework/source/class/qx/ui/form/Slider.js#L91 > > you should maybe liste for the 'losecapture' event: > > http://tinyurl.com/q7kthf7 I omitted to say that I'm using the mobile framework. This event does not seems to exists in this part :o( -- Frédéric ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
OK then try 'trackend':
http://tinyurl.com/plrsmbj Am 13.11.2015 um 14:46 schrieb Frédéric: > Le 13/11/2015, Dietrich a écrit : > >> from what i see in >> >> https://github.com/qooxdoo/qooxdoo/blob/master/framework/source/class/qx/ui/form/Slider.js#L91 >> >> you should maybe liste for the 'losecapture' event: >> >> http://tinyurl.com/q7kthf7 > I omitted to say that I'm using the mobile framework. This event does not > seems to exists in this part :o( > ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
Le 13/11/2015, Dietrich a écrit :
> OK then try 'trackend': > > http://tinyurl.com/plrsmbj Works fine, thank you very much! -- Frédéric ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
In reply to this post by fritz
Le vendredi 13 novembre 2015, Fritz a écrit :
> On Fri, 13 Nov 2015, Frédéric wrote: > > > To improve the design, I would like to know if it is possible to avoid > > the 'changeValue' event to be triggered when I set a new value from the > > code (using toggle.setValue())? I would like this event to be triggered > > only when the user *clicks* on the toggle, from the GUI... > > I had a similar problem and solved it by listening to the click event > instead of the changeValue event. Inside the click event handler you can > use getValue() to get the new value. I just noticed that my toggles does not work when I 'slide' them (on mobiles), instead of clicking onto them. What signal should I also bind to react to that? I tried 'swipe', but it does not seem to work... Thanks, -- Frédéric ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
Free forum by Nabble | Edit this page |