Hi,

Wonder if someone can help... I'm trying to build a basic tree using 
E4X notation but it's going kinda weird - as you can see if you run 
the code below, the tree seems to show ok - but it also shows the 
XML over the top of the tree!

I guess I'm doing something quite wrong here - could someone put me 
on the right track ?

(code below)

Thanks,

Jamie.


<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
        xmlns:mx="http://www.adobe.com/2006/mxml"; 
        layout="absolute" 
>
        
        <mx:Script>
        <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.collections.ArrayCollection;          

                [Bindable] public var myData:XML =
                                                          <catalog>
                                                          
        <category name="Companies" />
                                                          </catalog>;
                                                          
                private function buildTree():void{

                        myData.category.name[0]="Nat West PLC";
                        myData.category.name[0].name[0]="Nat West 
Reading";
                }
        ]]>
        </mx:Script>
        
        <mx:Panel>
                <mx:Tree id="prodTree" dataProvider="{myData}" 
width="200" showRoot="false" labelField="@name"   enabled="true" 
borderStyle="inset"/>
                <mx:Button click="buildTree()" label="Build"/>  
        
        </mx:Panel>
</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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to