0 Replies Latest reply on Aug 7, 2008 12:17 PM by henryblackman

    Mac OS X Application Menu Issues

      Hello. I'm trying to manipulate the default Application menu on OS X with some difficulty. I'm using the following functions, but the event listener I attach to the menu item NEVER fires. Using the same code but attaching a new menu created myself results in perfect predictable success.

      I'm keen to use the default menu so I can keep the built in commands, without having to write my own. I tried this with the Window menu, but it was very unpredictable, and was replaced.

      Any ideas?


      function menuUpdateAppMenu() {
      var root=application.menu;
      var tappMenu=root.getItemAt(0);
      var appMenu=tappMenu.submenu;

      var newBiography = appMenu.addItemAt(new air.NativeMenuItem("Biography..."),2);
      newBiography.addEventListener(air.Event.SELECT, selectWindow);
      newBiography.keyEquivalent = ",";

      function selectWindow(event) {
      air.trace("(menus.js) tried to activate window " + event.target.label);
      if (event.target.name=="menuRoomList") {
      newWindow = window.open("app:/chat/air/root_roomlist.html", "window_root_roomlist", "height=467,width=523,top=10,left=10");