Re: mouseMoved problems
Re: mouseMoved problems
- Subject: Re: mouseMoved problems
- From: Chris Meyer <email@hidden>
- Date: Thu, 21 Mar 2002 11:57:32 -0800
Hi Chris and John,
I'm already doing '[[self window] setAcceptsMouseMovedEvents:YES]' in
'viewDidMoveToWindow'. In fact I check to make sure it's actually doing
it by printing out the value in my mouseDown method.
I have the following code in my class:
- (void)viewDidMoveToWindow
{
NSLog( @"accepting mouseMoved" );
NSLog( [[self window] description] );
[[self window] setAcceptsMouseMovedEvents:YES];
}
It gets executed with a non-NULL window.
But... I'll look at the MouseTracker example and see if I can figure out
my problem from that.
Thanks,
Chris
On Thursday, March 21, 2002, at 11:41 AM, John Saccente wrote:
You have to "ask" to receive mouse moved messages. There's a nice
little mouse event handling example at
<
http://www.mmalc.com/examples/MouseTracker.gnutar.gz>
John Saccente
email@hidden
On Thursday, March 21, 2002, at 11:44 AM, Chris Purcell wrote:
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
_______________________________________________
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.