1 Reply Latest reply on Feb 21, 2011 10:39 PM by Flex harUI

    Upgrade from Flex 3 to 4 compile error with XMLList in MenuBar

    kokot-san Level 1

      Hi,

       

      After my upgrade I cannot use the XMLList for MenuBar items as before, so it seems. I was hoping somebody knows a quick solution:

       

      <mx:MenuBar labelField="@label"

        <mx:XMLListCollection id="idTreeMenuBarItems">

          <mx:XMLList id="idXMLItems" >

            <item label="Menu">

              <item label="Import Profile..." enabled="{true}"/>

            </item>

          </mx:XMLList>

        </mx:XMLListCollection>

       

      </mx:MenuBar>

       

      This gives me the folloiwng compile errors all over the place:

       

      1120: Access of undifined property idXMLItems

       

      Are we not allowed to use these kinds of constructs in Flex 4 anymore? How should I manage the enable/disable behavior then?

       

      Thank you,
      Andrej