Short answer is inside the title :)
Explaining: in my MainMenu.xib
I have only the Main Menu of the application, that must be same for all NSWindow
s I open. There is one particular NSWindowController
that has, let me say, all answers about when menu item must be enabled (via case
s on selector
in validateUserInterfaceItem
) and what to do with all actions. When NSWindow
associated with that NSWindowController
is currently focused, there is no problem, but as I focus on another NSWindow
all menus are grayed.
I have this flow now: MainMenu
is created by reference to it as Main nib into info.plist
, then AppDelegate
do some init stuff and create MainWinController
with MainWindow
, at some point MainWinController
creates 1+ DetailsWinController
with DetailsWindow
. AppDelegate
manage my custom menu by calling each time functions from MainWinController
.
So, how can I force the responder chain to query always that particular NSWindowController
(MainWinController
)?