Invoked to let the delegate update a menu item before it is displayed.
- macOS 10.3+
The menu object that owns
The menu-item object that may be updated.
The integer index of the menu item.
YESif, due to some user action, the menu no longer needs to be displayed before all the menu items have been updated. You can ignore this flag, return
YES, and continue; or you can save your work (to save time the next time your delegate is called) and return
NOto stop the updating.
YES to continue the process. If you return
menu: is not called again. In that case, it’s your responsibility to trim any extra items from the menu.
number delegate method returns a positive value, then your
menu: method is called for each item in the menu. You can then update the menu title, image, and so forth for each menu item.