Re: mouseMoved problems
Re: mouseMoved problems
- Subject: Re: mouseMoved problems
- From: Chris Purcell <email@hidden>
- Date: Thu, 21 Mar 2002 19:44:11 +0000
Direct from the first paragraph of Apple's documentation on handling
mouse events in views:
NSViews automatically receive mouse-clicked and mouse-dragged events,
but because mouse-moved events occur so often and can bog down the event
queue, an NSView must explicitly request its NSWindow to watch for them
using NSWindow's setAcceptsMouseMovedEvents: method.
Kritter out
Hi,
I have a custom view derived from NSView and I am trying to get
mouseMoved events but I don't get any. I think I have set everything up
properly. The following methods are defined in my custom view and when I
click the mouse it prints out "YES" in the log window. I get the
mouseDragged events just fine. But I never get a mouseMoved event.
Is someone out there successfully using mouseMoved events? Or are there
any bugs with it anyone knows about? Does it look like I'm doing
something obviously wrong?
I'm using 10.1.3 (5Q45) with Dec 2001 tools.
Thanks for any help,
Chris
- (void)mouseDown:(NSEvent *)theEvent
{
NSLog( [[self window] acceptsMouseMovedEvents] ? @"YES" : @"NO" );
}
- (void)mouseDragged:(NSEvent *)theEvent
{
NSLog( @"mouseDragged" );
}
- (void)mouseMoved:(NSEvent *)theEvent
{
NSLog( @"mouseMoved" );
}
_______________________________________________
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.