The Context
I'm populating a TableView's NSPopupMenuCell
's menu via Cocoa Bindings. All is well (I've bound 'Content', 'Content Values' and 'Selected Objects'). The menu is correctly populated at runtime and the underlying variable is properly being set (via KVC). Everything works on that end.
My Problem
Next I'd like to control the state of the populated menu items (as some would need to be disabled). Now I've read Apple's documentation on Enabling Menu Items very carefully… but for the life of me I can't seem to implement validateMenuItem:
nor validateUserInterfaceItem:
where they would actually get called.
I've tried, amongst other things, implementing these methods in the already existing App delegate but no joy. Am I perhaps misunderstanding something with the First Responder chain?
Also, logically, the other possibility is that the menu items actually do have Targets (the above assumes they don't). But, again, I can't seem to be able to identify their targets (so that I may implement validateMenuItem:
there).