I have a controller object that owns an NSMenu and is that menu's delegate, in the interest of lazy population.
However, neither numberOfItemsInMenu:
nor menuNeedsUpdate:
is ever called, and so the menu remains empty.
I have confirmed that:
- The controller object has not been deallocated. (The controller, in turn, owns the menu.)
- It does have a menu.
- The menu does have a delegate, and that is the controller.
If I implement menuWillOpen:
, that is called, but you're not supposed to populate the menu there.
I tried sending the menu an update
message, and that had no effect. The delegate remained un-called, and the menu remained empty.
In case it's relevant: This menu is not in the main menu; it is used elsewhere.
Why isn't the menu asking its delegate to populate it? Is there something I've missed, or is this just broken?