Background:
I have a custom subclass of NSOutlineView, with a custom contextual menu.
This subclass implements the target actions of the menu and
The menu items are all connected to the first responder.
This all works well.
Requirement:
The Apple User Guidelines teaches that all actions should have multiple ways to use. So, the contextual menu's are added to the main menu, and the actions are again added to the first responder, this time of the NSMainMenu.nib
Problem:
It doesn't work. Another item of the nsmainmenu whose action is implemented by the subclass of the windowcontroller does find its way through the responder chain and functions as expected. But the ones implemented in the NSOutlineView subclass don't
Tried:
Connecting the NSOutlineview with first responder in IB.
Make the NSOutlineview subclass first responder in awakeFromNib.
Requested:
euh... a tip/trick/solution, something that could help. I don't want to reimplement all these functions again the NSDocument subclass or NSwindowController subclass. That seems to be unnecessary clutter to me.
Thanks.
I have a custom subclass of NSOutlineView, with a custom contextual menu.
This subclass implements the target actions of the menu and
Code:
- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem
This all works well.
Requirement:
The Apple User Guidelines teaches that all actions should have multiple ways to use. So, the contextual menu's are added to the main menu, and the actions are again added to the first responder, this time of the NSMainMenu.nib
Problem:
It doesn't work. Another item of the nsmainmenu whose action is implemented by the subclass of the windowcontroller does find its way through the responder chain and functions as expected. But the ones implemented in the NSOutlineView subclass don't
Tried:
Connecting the NSOutlineview with first responder in IB.
Make the NSOutlineview subclass first responder in awakeFromNib.
Requested:
euh... a tip/trick/solution, something that could help. I don't want to reimplement all these functions again the NSDocument subclass or NSwindowController subclass. That seems to be unnecessary clutter to me.
Thanks.