Re: NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
Ah-ha. Thanks! When I gave something else in the view focus, the menu was validated as expected, because the responder chain then would have gone through my view controllers. This also explains why it makes sense to insert the NSViewControllers above NSWindow in the responder chain (which oth

Re: NSViewController in the responder chain

2013-01-06 Thread Quincey Morris
On Jan 6, 2013, at 16:53, Arved von Brasch wrote: > I first noticed a problem when I couldn't get a NSMenuItem to validate, but > it seems to also be a problem with buttons. Don't get side-tracked by looking at button actions. Validation works differently, and since buttons are not normally fi

Re: NSViewController in the responder chain

2013-01-06 Thread Ken Thomases
On Jan 6, 2013, at 6:53 PM, Arved von Brasch wrote: > Thank you both for responding. I am pretty sure I have everything linked up > properly. I first noticed a problem when I couldn't get a NSMenuItem to > validate, but it seems to also be a problem with buttons. I created a > NSButton subcl

Re: NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
Thank you both for responding. I am pretty sure I have everything linked up properly. I first noticed a problem when I couldn't get a NSMenuItem to validate, but it seems to also be a problem with buttons. I created a NSButton subclass to test this: @interface ABTestButton : NSButton @end @

Re: NSViewController in the responder chain

2013-01-06 Thread Andy Lee
On Jan 6, 2013, at 8:06 AM, Keary Suska wrote: > Just to be explicit, the custom NSView must also itself be in the responder > chain--i.e. the first responder must the the view or one of its descendants. > Also, you need to make sure that no other responder in the chain *below* the > controlle

Re: NSViewController in the responder chain

2013-01-06 Thread Keary Suska
On Jan 6, 2013, at 6:17 AM, Arved von Brasch wrote: > I have a modular single window application, where it has become necessary to > put control code into NSViewController subclasses. > > I have googled extensively on this issue, and it seemed pretty easy. The > solution I went with is here: >