Hi,
I need to add couple of items to “application Name” menu which is created by the OS. I tried adding the items to main.nib but it doesn’t show up when the application is running.
I used "static void setMacMainMenu (MenuBarModel *newMenuBarModel)" to display the menu in mac style.
Does anybody know how do i solve my problem. Am currently using JUCE 1.45.
As far as I can tell, this isn’t possible using Carbon, but as I’m currently rewriting all the mac stuff with Cocoa, I’ll probably be able to add this functionality in the future…
According to mac standard “about Application” and “Preferences” should be displayed in Application Menu , these calls can put these two options in the Application Menu
EnableMenuCommand(NULL,kHICommandPreferences); for preferences option
EnableMenuCommand(NULL,kHICommandAbout); for about option
But the problem with this code is even if the options are selected, it doesn’t invoke “void menuItemSelected (int menuItemID, int topLevelMenuIndex)” , so am not able to handle the event.
Just wondering what the best way to get a callback from the applications main ‘app name’ menu is? We have a MenuBarModel which appears via a call to setMacMainMenu() which works fine, but we need a preferences and about item in the ‘appname’ menu, which we can add with the carbon function EnableMenuCommand(NULL,kHICommandPreferences);
but is there then a juce ‘approved’ way to handle the event received from that menu item?
Or is there an easier way to achieve overriding the main ‘appname’ menu too?