<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="400" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.ArrayCollection;
[Bindable]
public var myData:XML=
<catalog>
<category name="Folder">
<product name="file 1"/>
<product name="file 2"/>
<product name="file 3"/>
</category>
</catalog>;
[Bindable]
public var listDP:XMLListCollection = new XMLListCollection(new XMLList());
[Bindable]
public var testDP:XMLListCollection = new XMLListCollection( new XMLList( myData.children() ) );
// Add the item selected in the Tree to the List XMLList data provider.
private function doTreeSelect():void
{
if (prodTree.selectedItem)
listDP.addItem(prodTree.selectedItem);
trace( myData );
trace( "****************" );
trace( listDP.source );
}
]]>
</mx:Script>
<mx:Tree id="prodTree" dataProvider="{testDP}" width="200" showRoot="true" labelField="@name"/>
<mx:HBox>
<mx:Button id="treeSelect" label="Add to List" click="doTreeSelect()"/>
</mx:HBox>
<mx:List id="prodList" dataProvider="{listDP}" width="200" labelField="@name"/>
</mx:Application>
__._,_.___
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___

