flex : @ symbol: what's that ?

what is the @ symbol isgnification is FLEX ?

For instance :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
   <mx:XML id="menus">
      <menus>
         <menu label="Fichier">
            <menu label="Ouvrir" />
            <menu label="Sauvegarder" />
            <menu label="Fermer" />
            <menu type="separator" />
            <menu label="Quitter" />
         </menu>
         <menu label="Edition">
            <menu label="Couper" />
            <menu label="Copier" />
            <menu label="Coller" />
         </menu>
      </menus>
   </mx:XML>
   
   <mx:MenuBar dataProvider="{menus.menu}" labelField="@label" right="10" top="10" left="10"/>
   
</mx:Application>
yarekAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LordOfPortsCommented:
0
julianopolitoCommented:
this is an operator for accessing E4X xml tag attributes. For example:

var doc:XML = <book label="My Book" />;
trace(doc.@label);//traces "My Book"

In the case you showed

<mx:MenuBar dataProvider="{menus.menu}" labelField="@label" right="10" top="10" left="10"/>

labelField must be told what is the property in the dataprovider that contains the labels for the menu items, in this case @label says GET ITEM LABELS FROM LABEL ATTRIBUTE OF TAGS
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
julianopolitoCommented:
Another example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
   <mx:XML id="menus">
      <menus>
         <menu label="Fichier" name="John">
            <menu label="Ouvrir" name="Mac" />
            <menu label="Sauvegarder"  name="Mary" />
            <menu label="Fermer"  name="Zak"/>
            <menu type="separator" />
            <menu label="Quitter"  name="Peter" />
         </menu>
         <menu label="Edition" name="Orson">
            <menu label="Couper" name="Jack" />
            <menu label="Copier" name="Gabriel" />
            <menu label="Coller" name="Sam" />
         </menu>
      </menus>
   </mx:XML>
   
   <mx:MenuBar dataProvider="{menus.menu}" labelField="@name" right="10" top="10" left="10"/>
   
</mx:Application>


In this case instead of menu items named with label, they will be labeled with names. Try it.



0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Flex

From novice to tech pro — start learning today.