Re: Getting 'mouseMoved' events
Re: Getting 'mouseMoved' events
- Subject: Re: Getting 'mouseMoved' events
- From: Matthew <email@hidden>
- Date: Tue, 21 May 2002 20:02:32 -0400
Jim -
Make sure that your view is the first responder. Test to make sure that
the window is getting the setAcceptsMouseMovedEvents message ok. It
seems like you shouldnt have to be the first responder to get mouse
moved events - I could see where you might want to track them in views
that arent the fr - but thats the way it is.
(from within your NSView's awakeFromNib method - if you are using nibs)
- (void)awakeFromNib
{
[[self window] makeFirstResponder: self];
[[self window] setAcceptsMouseMovedEvents: YES];
if ([[self window] acceptsMouseMovedEvents]) {NSLog(@"window now
acceptsMouseMovedEvents");}
}
hope this works for you,
cheers,
M@
On Monday, May 20, 2002, at 07:03 PM, James Pengra wrote:
I have an NSView in which I utilize mouseDown events and would also
like to track the mouse cursor using mouseMoved events. I send the
message [myWindow setAcceptsMouseMovedEvents:YES]; before looking for
mouse movement, but the procedure -(void)mouseMoved:(NSEvent
*)event never gets called. However, mouseDown gets called every time
I click in the View.
What else must I do to to activate mouseMoved events?
Thanks, Jim
_______________________________________________
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.
_______________________________________________
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.