• 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
Re: Hooking up Help menu item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hooking up Help menu item


  • Subject: Re: Hooking up Help menu item
  • From: Graham Cox <email@hidden>
  • Date: Sat, 15 Feb 2014 23:42:37 +1100

On 15 Feb 2014, at 8:40 pm, Roland King <email@hidden> wrote:

> This is the second responder chain issue which has confused me, another menu item had to be hooked up to point directly to an NSView subclass because sending that to First Responder didn't work either. I eventually decided the window wasn't in the chain so it wasn't getting it.


The Window probably was in the chain, if it was active. The view probably wasn't. If you make a NSView subclass, you have to opt-in to becoming first responder by overriding -acceptsFirstResponder (NSResponder) to return YES.

Sometimes it's OK to hook a menu directly to a view rather than FR, but usually only in a single-window app, or where the view is part of a specific app-wide window, rather than, say, a document.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Hooking up Help menu item (From: Roland King <email@hidden>)

  • Prev by Date: Re: Hooking up Help menu item
  • Next by Date: NSOpenGLContext destroying textures of another context
  • Previous by thread: Re: Hooking up Help menu item
  • Next by thread: NSOpenGLContext destroying textures of another context
  • Index(es):
    • Date
    • Thread