On 15 Feb 2014, at 8:40 pm, Roland King <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to