0 Replies Latest reply on Aug 14, 2011 1:33 PM by kid electric

    Using FlexNativeMenu in AIR desktop app

    kid electric Level 1

      Hello, I am having trouble using the FlexNativeMenu component in an AIR desktop app...


      It seems the syntax has changed since previous versions of Flex, so I'm not sure how to get this to work.


      I have my menu items / data provider as:




      private var menubarXML:XMLList =


      <menuitem label="File" data="top">

      <menuitem label="Exit" data="QUIT"/>


        <menuitem label="View" data="top">

      <menuitem label="MenuItem1" data="mi1"/>


        <menuitem label="Help" data="top">

      <menuitem label="Overview" type="check" data="OVERVIEW"  />






      And then I tried to set the menu as such in the MXML:




      <mx:FlexNativeMenu id="rrMenu" showRoot="false"

         labelField="@label" dataProvider="{menubarXML}"

         itemClick="menuHandler(event);" />





      This didn't give an error, but shows nothing when I run the program.


      So I tried just FlexNativeMenu by itself, but this tells me that it must be placed in Declarations instead of the main stage. So I moved it to Declarations, but it still shows no menu bar...