Re: Changing an NSCursor on "Mouse-Over"
Re: Changing an NSCursor on "Mouse-Over"
- Subject: Re: Changing an NSCursor on "Mouse-Over"
- From: Iain Wood <email@hidden>
- Date: Thu, 11 Mar 2004 10:10:58 +0000
On 11 Mar 2004, at 09:02, Michael Becker wrote:
Am 10.03.2004 um 22:52 schrieb Allan Odgaard:
On 10. Mar 2004, at 18:31, Michael Becker wrote:
So how can I achieve this "mouse is over specified coordinate, so do
something" behaviour? Is there something like -mouseDown: only
without the "down" :-) ?
You mean something like this:
- (void)mouseMoved:(NSEvent *)theEvent
I thought so, too, at first. But even though my windows
-setAcceptsMouseMovedEvents: is set to YES and I implemented the
-mouseMoved: method, it never gets called. I've read of this
phenomenon in the archives, too, so it seems to be either a bug or a
feature :-)
Should I go for -addCursorRect:cursor: and update the cursor-rect
stack every time a resize of my selection rectangle is completed?
Do you mean addTrackingRect? If so, then yes, you need to use
trackingRects with mouseMoved events, unlike mouseDown events which
just get handed to your NSView subclass with no effort on your part.
Garfinkel and Mahoney "Building Cocoa Applications" chapter 18 covers
this if you need a reference.
Iain
_______________________________________________
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.