Invoked when a menu is about to be displayed at the start of a tracking session.
- macOS 10.3+
The menu object that is about to be displayed.
Using this method, the delegate can change the menu by adding, removing, or modifying menu items. If populating the menu will take a long time, implement
Menu item validation occurs after this method is called. If the menu is updated because the user pressed a command key, only the menu item with the matching command key is validated; if the menu is updated because the user opened it, then every menu item is validated.