Man, I've spent hours on this ... and the documentation seems no help.

I'm trying to populate a Tree from the following XML file:

<?xml version="1.0"?>
    <node label="Mail" date="27-06-2006">
        <node label="Inbox" date="28-06-2006" isBranch="true"/>
        <node label="Personal Folder" date="29-06-2006">
            <node label="Demo" date="30-06-2006" filetype="msword_file"/>
            <node label="Personal" date="31-06-2006" filetype="msword_file"/>
            <node label="Saved Mail" date="01-07-2006" filetype="msword_file"/>
            <node label="Spam" date="02-07-2006" filetype="msword_file"/>
        </node>
        <node label="Business Folder" date="29-06-2006">
            <node label="Instructions" date="30-06-2006" filetype="pdf_file"/>
            <node label="Personnel Database" date="31-06-2006" 
filetype="msaccess_file"/>
            <node label="Quarterly Spreadsheet" date="01-07-2006" 
filetype="msexcel_file"/>
            <node label="Company Logo" date="02-07-2006" filetype="jpg_file"/>
        </node>        
        <node label="Calendar" date="03-07-2006"/>
        <node label="Sent" date="04-07-2006"/>
        <node label="Trash" date="05-07-2006"/>
    </node>


can anyone explain why the following code works (pretty much):

<mx:XML source="treexmldatastruct.xml" id="myMenuStruct" format="e4x"/>
<mx:XMLListCollection id="myMenuStructListColl" source="{myMenuStruct.*}"/>

<mx:Tree id="firstList" showRoot="false" dataProvider="{myMenuStructListColl}"
labelField="@label" />

while the following does *not*:

<mx:HTTPService id="treeModel" url="treexmldatastruct.xml" resultFormat="e4x"  
        showBusyCursor="true" fault="mx.controls.Alert.show('Could not get xml 
Info!!!')" />

also using:

result="firstList.dataProvider=treeModel.lastResult.*" 

in the HTTPService doesn't help, instead of the decalring the dataProvider in 
the Tree doesn't seem to change anything.

In fact, I'm kinda fuzzy about the whole lastResult / event.result methods 
anyway ... any pointers here? Or best practices?

Is using URLLoader instead an option?

Thanks
John




--
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