Re: mouse moved events in NSView?
Re: mouse moved events in NSView?
- Subject: Re: mouse moved events in NSView?
- From: "David Piasecki" <email@hidden>
- Date: Tue, 11 May 2004 17:40:12 -0700
I had tried adding the mouseMoved event to my NSView, and it didn't=20
work. I know from the documentation that "NSWindows don=92t accept=20
mouse-moved events by default." Just for kicks, I tried [myView=20
setAcceptsMouseMovedEvents:true], but that gives a warning that myView=20=
may not respond to that event. So I'm not sure how to enable the=20
mouseMoved event for an NSView, or if it's even possible (though I=20
don't see why it shouldn't be).
mouseMoved:
- (void)mouseMoved:(NSEvent *)theEvent
Informs the receiver that the mouse has moved specified by theEvent.=20
NSResponder=92s implementation simply passes this message to the next=20
responder.
See Also: =96 setAcceptsMouseMovedEvents: (NSWindow)
David
On May 11, 2004, at 5:28 PM, Satoshi Matsumoto wrote:
>
on 04.5.12 9:06 AM, David Piasecki at email@hidden wrote:
>
> Can mouse moved events only work with NSWindows? I would like to=20
>
> detect
>
> when a mouse has moved inside a particular NSView, updating its
>
> position as it goes.
>
>
NSView is a subclass of NSResponder.
>
NSResponder supports mouseMoved:(NSEvent *)theEvent.
>
>
Satoshi
>
-----------------------------------------------------
>
Satoshi Matsumoto <email@hidden>
>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
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.