I have a controller object that owns NSMenu and is a menu delegate, in the interests of a lazy population.
However, neither numberOfItemsInMenu: nor menuNeedsUpdate: ever called, so the menu remains empty.
I have confirmed that:
- The controller object is not freed. (The controller, in turn, owns the menu.)
- He has a menu.
- There is a delegate in the menu, and this is the controller.
If I implement menuWillOpen: which is called, but you should not populate the menu there .
I tried to send the update message to the menu, and this did not affect. The delegate was left without a call, and the menu remained empty.
In case it is relevant: this menu is absent in the main menu; It is used elsewhere.
Why doesn't the menu ask its delegate to fill it in? Is there something I missed, or is it just broken?
source share