you could find more information in the thread of Mail List

http://www.mail-archive.com/search?l=flexcoders%40yahoogroups.com&q=Tree


Regards.

On 11/1/06, meathead <[EMAIL PROTECTED]> wrote:

Hi all,

I'm at a loss here. I've got a tree set up to retrieve XML data.
It works fine until the data in the XML changes. Then the tree
won't reflect the new data until my flex application is recompiled.
I believe when the application is being recomplied it's grabbing the
XML and setting it somehow. Here is some code.

****************CODE***************
<mx:Script>
<![CDATA[
import mx.events.ListEvent;
import mx.controls.Alert;
import mx.collections.*;

[Bindable]
public var myXLC:XMLListCollection;

public function afterComp():void
{
myXLC = new XMLListCollection(TreeXML.children());
tvwProjects.invalidateList();
}
]]>
</mx:Script>

<mx:XML source="http://Path/To/XML.aspx" id="TreeXML"/>

<mx:Tree id="tvwProjects" width="100%" height="100%"
dataProvider="{myXLC}" labelField="@label" itemClick="treeClickEvent
(event);" y="10">
</mx:Tree>
************END OF CODE*******************
I've also tried the above without the XMLListCollection and just
putting the TreeXML straight into the Tree object dataProvider. The
afterComp function is called in the application createCompletion
event. I've also tried with and without invalidateList.

Basically, How can I get the Tree control to grab the latest and
greatest from the XML?

Thanks,
Aaron




--
----------------------------
Igor Costa
www.igorcosta.com __._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to