Hi, I'm loading XML in to Flex2 at compile-time and would like to bind label properties of certain modes to a Tree list display.

The docs say that you cannot (currently) bind to properties of an XML instance (the XML class is not of type IEventDispatcher) so I thought I would try loading the XML in to Model instance instead, using:

<mx:Model id="menuItems" source="xml/menuOptions.xml" />

My test XML looks like this:
<?xml version='1.0' ?>
<menu>
    <folder label="Flex 2">
        <item label="Tutorial 1" >Hello</item>
        <item label="Tutorial 2" />
        <item label="Tutorial 3" />
    </folder>
</menu>

I don't think model instances support attributes though, so while trace(menuItems.item[0]) works, I can't seem to access the label attribute. Could someone confirm that this is right, and if so, are there any better suggested methods to use, or do i just need to load the xml in to an XML instance, and then use E4X to pull out the label attributes and assign them to bindable vars of my own creation?

Cheers,
Neil __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to