2 Replies Latest reply on Aug 1, 2008 5:35 PM by mjr81

    NativeMenuItem Cross Platform?

    mjr81
      NativeMenuItem Help documentation states that there are two different protocols for making native menus in Mac and Windows. I'd like to make a cross-platform application. Is there any sample code out there for JavaScript that would allow me to build the menus in both platforms?

      Again, I need Javascript code samples, I'm already aware of the flex plugin "everythingflex" to do this but am looking to do this in Javascript. I've already researched the subject extensively and can't find how to do this corss-platform anywhere.
        • 1. Re: NativeMenuItem Cross Platform?
          Joe ... Ward Level 4
          Have you seen the JavaScript MenuBuilder framework? ( http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5A0AC2D1-B4A5-490d-A3E1-0C500B5B259C.htm l).

          I'm not sure exactly what you mean by protocol, but the menus on Mac and Windows are quite different. You can simplify things by completely overwriting the default Mac menu with your own rather than integrating your menu commands (items) into the existing menus. This will make your app less Mac-like, though.

          There is a menu example for HTML-based AIR apps at: http://www.adobe.com/devnet/air/ajax/quickstart/adding_menus.html
          • 2. NativeMenuItem Cross Platform?
            mjr81 Level 1
            "Protocol": "In object-oriented programming, a protocol or interface is what or how unrelated objects use to communicate with each other. These are definitions of methods and values which the objects agree upon in order to cooperate."
            I was just noting that there are two VERY different ways of creating native menus.

            I did find what you linked to after a bit more search and found that i can actually define the menus in an XML document with callback functions and everything. Thanks so much for replying.

            "You can simplify things by completely overwriting the default Mac menu with your own rather than integrating your menu commands (items) into the existing menus. This will make your app less Mac-like, though."
            -I'm a Mac geek so that method is right-out :) Integration is the only possible option for me and my app has a lot of potential Windows users that need to have the same experience.