Re: Getting Mouse Moved Events
Re: Getting Mouse Moved Events
- Subject: Re: Getting Mouse Moved Events
- From: Michael Latta <email@hidden>
- Date: Sat, 28 Dec 2002 19:11:03 -0800
Greg,
Thanks for the reply. My requirements do not fit well into the
tracking rectangle solution, unless I make the entire view one
rectangle.
Given the restrictions that appears to be my only approach, short of
doing my own event dispatching. Would mouse moved be available to an
inner event polling loop responding to mouseEntered? I tend to avoid
such constructs, preferring to rely on the main event loop, but it
might be the right solution to this.
Also the text in the documentation on mouse event dispatching "The
NSView selected to receive a mouse event is determined by the NSWindow
using NSView's hitTest: method, which returns the lowest descendant
that contains the cursor location of the event (this is also the
topmost NSView displayed)." makes no mention of having to be first
responder. It clearly works that way, but does not make it clear why
it works that way. Could I override the NSWindow methods to dispatch
to the desired view?
Michael
On Saturday, December 28, 2002, at 04:59 PM, Greg Titus wrote:
On Saturday, December 28, 2002, at 03:18 PM, Michael Latta wrote:
Mostly I am annoied that the requirement to be first responder exists
at all. Having to notify the window that you want these events makes
sense from an efficiency point of view, but often (in my cases
anyway) I want to track the mouse moved to do highlighting in places
where I am NOT the first responder.
Hi Michael,
If you are doing highlighting on mouse over, you might want to look at
the documentation for tracking rects and -mouseEntered:, -mouseExited:
messages instead of using -mouseMoved:. Using tracking rects requires
a bit more setup, but it is an efficient way to handle these kinds of
highlighting, and it doesn't require being first responder.
Hope this helps,
- Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.