Reputation: 24332
I was trying to implement menu bar control in my Flex application as follow:
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:MenuBar id="myMenuBar2" labelField="@label">
<mx:XMLList>
<menuitem label="MenuItem A">
<menuitem label="SubMenuItem A-1" enabled="false"/>
<menuitem label="SubMenuItem A-2"/>
</menuitem>
<menuitem label="MenuItem B"/>
<menuitem label="MenuItem C"/>
<menuitem label="MenuItem D">
<menuitem label="SubMenuItem D-1"
type="radio" groupName="one"/>
<menuitem label="SubMenuItem D-2"
type="radio" groupName="one"
selected="true"/>
<menuitem label="SubMenuItem D-3"
type="radio" groupName="one"/>
</menuitem>
</mx:XMLList>
</mx:MenuBar>
</mx:Panel>
But that will work only with the old library.
In Flex 4 we use following namespaces:
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
But <mx:XML>
and <mx:XMLList>
tags are not there.
However they are included in ActionScript 3.0.
Why they need this separation? What is the reason behind this?
Upvotes: 0
Views: 1090
Reputation: 2087
the namespace changed, XML and XMLList are now in the fx namespace
Upvotes: 1