# Problem with Menu

**URL:** <https://forum.juce.com/t/problem-with-menu/3124>\
**Category:** MacOSX and iOS\
**Created:** [August 12, 2008, 7:10am UTC](https://forum.juce.com/t/problem-with-menu/3124 "2008-08-12T07:10:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishvesh](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@vishvesh](https://forum.juce.com/u/vishvesh)\
**Post date:** [August 12, 2008, 7:10am UTC](https://forum.juce.com/t/problem-with-menu/3124/1 "2008-08-12T07:10:27Z")

</div>

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.

```

Regards,  
Vishvesh

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 13, 2008, 6:58pm UTC](https://forum.juce.com/t/problem-with-menu/3124/2 "2008-08-13T18:58:51Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![vishvesh](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@vishvesh](https://forum.juce.com/u/vishvesh)\
**Post date:** [August 23, 2008, 4:56am UTC](https://forum.juce.com/t/problem-with-menu/3124/3 "2008-08-23T04:56:05Z")

</div>

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.

Is there any fix for this.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 28, 2008, 5:51pm UTC](https://forum.juce.com/t/problem-with-menu/3124/4 "2008-08-28T17:51:06Z")

</div>

It wasn’t possible to do anything with that menu using Carbon, but once I’ve rewritten it all in Cocoa, all this should work…

---

<div class="post-metadata">

**Author:** ![kmolcard](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@kmolcard](https://forum.juce.com/u/kmolcard)\
**Post date:** [December 1, 2008, 12:57pm UTC](https://forum.juce.com/t/problem-with-menu/3124/5 "2008-12-01T12:57:57Z")

</div>

Hi Jules,  
I just wanna know if it is now (since you have done the Cocoa code) possible to had items in this menu?

Thx,

Kevin

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 1, 2008, 3:13pm UTC](https://forum.juce.com/t/problem-with-menu/3124/6 "2008-12-01T15:13:09Z")

</div>

Yes!

---

<div class="post-metadata">

**Author:** ![yndurain](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yndurain/32/3261_2.png) [@yndurain](https://forum.juce.com/u/yndurain)\
**Post date:** [April 2, 2009, 12:44pm UTC](https://forum.juce.com/t/problem-with-menu/3124/7 "2009-04-02T12:44:05Z")

</div>

Hi Jules,

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?

Thanks,

a

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [April 2, 2009, 3:14pm UTC](https://forum.juce.com/t/problem-with-menu/3124/8 "2009-04-02T15:14:11Z")

</div>

The latest version in SVN has an extra parameter to setMacMainMenu for adding stuff to the app menu…
