I implemented a tabbar view as an NSControl subclass.
When I click it, AppKit will try to update the firstResponder
of my NSWindow. Because I don't want the tabbar to become firstResponder
(acceptsFirstResponder
returns NO
) the NSWindow itself will become the firstResponder
. My responder chain will consist of the window and it's controller and no Action Messages are delivered to the subview below the tabbar (an NSOutlineView). I'd like the NSOutlineView to keep receiving Action Messages and Events when I click the tabbar.
What's the appropriate way to do this? Is there no way to stop an NSView from trying to change the firstResponder
when being clicked on?
I thought about setting the toolbar's nextResponder
to the NSOutlineView, but manually changing the nextResponder
of an NSView is not recommended by Apple.
I ended up manually resetting the
firstResponder
to the outline view in my tabbar's delegate method implementation.An other solution I came up with is implementing this in the tabbar to reset
firstResponder
to the original object, if the tabbar becomes thefirstResponder
.