[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] mouseMoveAction - slight inconsistency



the names are confusing:

mouseMoveAction is actually a mouse-drag-action

and

mouseOverAction could be seen as a mouse-move-action (without button being pressed)

acceptsMouseOver controls whether mouse-over-events are generated, it doesn't affect mouse-drags.

i think this is consistent in some way.

ciao, -sciss-



Am 27.11.2007 um 13:35 schrieb Fredrik Olofsson:

hi list,
how come mouseMoveAction and mouseOverAction behaves so differently?
couldn't they be generalised?

(
var w= GUI.window.new("mousemovetest", Rect(100, 100, 513, 666), false); var u= GUI.userView.new(w, Rect(0, 0, w.bounds.width, w.bounds.height));
	w.view.background_(Color.grey(0.8));
	//w.acceptsMouseOver_(true);
	u.mouseMoveAction_{|v, x, y|
		[x, y].postln;
	};
	w.front;
)


(
var w= GUI.window.new("mousemovetest", Rect(100, 100, 513, 666), false); var u= GUI.userView.new(w, Rect(0, 0, w.bounds.width, w.bounds.height));
	w.view.background_(Color.grey(0.8));
	w.acceptsMouseOver_(true);		//here this is needed
	u.mouseOverAction_{|v, x, y|
		[x, y].postln;
	};
	w.front;
)



  #|
     fredrikolofsson.com     klippav.org     musicalfieldsforever.com
  |#

_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel