Hello, I am working on a complex popup system which is working perfectly fine on Windows, but I am having some issues getting it to work on OSX. For the system to be able to work I need to be able to update the NSMenu before it is shown to the user. In the JUCE code the JuceMenuCallbackClass adopting the NSMenuDelegate protocol does receive a menuNeedsUpdate but only the first time it is called. When I remove the call to menuBarItemsChanged I do get a second callback when a menu is requested. I tried setting the addDelegate bool in the createMenu method to try to listen to all the menus in order to get a second callback, but even then menuNeedsUpdate is never called again.
My question boils down to this:
How can I get a callback to reconstruct my menu whenever a user clicks on the menubar (before the menu is shown)?