mouseMoved and first responder madness
mouseMoved and first responder madness
- Subject: mouseMoved and first responder madness
- From: Brad Oliver <email@hidden>
- Date: Tue, 10 Dec 2002 16:40:19 -0600
I've got a NSDocument based app with a scrolling view for which I need
mouseMoved events.
For the most part, all is well if I add these to the view class:
- (BOOL)acceptsFirstResponder
{
return TRUE;
}
- (BOOL)becomeFirstResponder
{
[[self window] setAcceptsMouseMovedEvents: TRUE];
return TRUE;
}
- (BOOL)resignFirstResponder
{
[[self window] setAcceptsMouseMovedEvents: FALSE];
return TRUE;
}
But there's a problem. If I click on the menu bar - even if I don't select a
menu item - my view does not get first responder status again (and thus, no
mouse moved events) until I click on the window or in the view itself.
What am I doing wrong? What becomes the first responder after a menu
selection?
--
Brad Oliver
email@hidden
_______________________________________________
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.