FROM : Brad Oliver
DATE : Tue Dec 10 23:40:19 2002
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_removed>
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Tue Dec 10 23:40:19 2002
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_removed>
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Brad Oliver | Dec 10, 23:40 | |
| Bruce | Dec 11, 14:45 | |
| Brad Oliver | Dec 11, 20:41 |






Cocoa mail archive

