I have a menu item whose state should depend on whichever NSDocument
is open. From my understanding, to make its state change dynamically I should use the NSMenu
delegate method menuNeedsUpdate:
.
It seems like I would want to have the menu's delegate be the First Responder in MainMenu.xib
. However, Interface Builder won't let me set it as the Main Menu's delegate. How can I make a delegate which will be able to access the currently active document?