Button mouseUpAction view.value broken since long

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Button mouseUpAction view.value broken since long

Fredrik Olofsson
this is an issue from way back.  same with cocoa gui under sc365.

mouseUpAction reports the wrong button value.  also mouseDownAction.

action and value agree but mouseUpAction is inverted.

var w;
w= Window.new.front;
b= Button(w, Point(100, 100));
b.states_([ ["a", Color.red, Color.blue], ["b", Color.yellow, Color.green]]);
b.action= {|view| ("action"+view.value).postln};
b.mouseDownAction= {|view| ("mousedown"+view.value).postln};
b.mouseUpAction= {|view| ("mouseup"+view.value).postln};

b.value= 1
b.value= 0


     fredrikolofsson.com     musicalfieldsforever.com

sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/