AIR Native Menu Flex Bug on OSX 10.6

I had a few problems with native menus on the mac recently. Some of them were menu items, that didnt react on user input (the menu shortcut did however). Another bug, which only occured on 10.6, was that the native menu of my AIR app was showing 2! mac system menus (1 normal and 1 small apple icon) and also the whole application crashed, when using specific menu items.
However, I reported the bug to Adobe and received the answer a couple of hours later:

The key thing is to not replace the NativeApplication.nativeApplication.menu. Instead, you want to modify it, for example by inserting your own menus into the existing root menu.

For example, if you want to replace the “standard” File menu with your own, you would do:

var rootMenu:NativeMenu = NativeApplication.nativeApplication.menu;
rootMenu.removeItemAt(1);
rootMenu.addSubmenuAt(menu, 1, "File");

Share/Save

Tuesday, September 1st, 2009 Development

1 Comment to AIR Native Menu Flex Bug on OSX 10.6

  • Taylor says:

    Thank you, thank you, thank you!

    After quite a bit of searching, I was just about to submit a bug into their database. You’ve saved me a lot of time my friend!

  • Leave a Reply



    2009: WebTech Flex Day - Speaker
    2009: RIA Summer Jam - Organizer
    2009: RIA World 09 - Speaker
    2009: Flash Camp Berlin - Speaker
    2009: Flashforum Konferenz - Speaker
    2008: Flex UG Munich - Speaker
    2008: Adobe onAir Tour - Speaker