• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
mouseMoved and first responder madness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Initializing NSOpenGLViews
  • Next by Date: Re: How to draw a horizontal line in a NSTextView?
  • Previous by thread: Re: Initializing NSOpenGLViews
  • Next by thread: Re: mouseMoved and first responder madness
  • Index(es):
    • Date
    • Thread