I'm not exactly sure what the question is, but it seems you're asking
if changes to data pulled from the Tree will be seen in the
original data structure? 

If that's what you mean, then you don't need binding, the Tree control
already uses (and returns) your data by reference.  If you get a data
point from the Tree control (like selectedItem), then changes to that
reference will be reflected in your original data structure. 

This doesn't mean that the changes will be seen by the Tree however.
Some data types, like Object, require a change notification structure
like binding or Collections.    

Is that what you're looking for?

-Michael


--- In [email protected], "Rick Schmitty" <[EMAIL PROTECTED]> wrote:
>
> Is there a way to bind back to where the original databind came from?
> Not sure if thats the correct terminology for what I'm trying to
> say...so here is my simple example.
>
> In the example below it "kinda" happens, but only if you expand/close
> a node after.  The list editor should also update the tree, and vice
> versa.  I'm sure I'm missing a simple step here...
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal">
>
> <mx:Script>
>       <![CDATA[
>      
>       [Bindable] public var fileSystemStructure:Object =
>           {label:"mx", children: [
>               {label:"Containers", children: [
>                   {label:"Accordian", children:[]},
>                   {label:"DividedBox", children: [
>                       {label:"BoxDivider.as", data:"BoxDivider.as"},
>                       {label:"BoxUniter.as", data:"BoxUniter.as"}]},
>                   {label: "Grid", children:[]}]},
>               {label: "Controls", children: [
>                   {label: "Alert", data: "Alert.as"},
>                   {label: "Styles", children: [
>                       {label: "AlertForm.as", data:"AlertForm.as"}]},
>                   {label: "Tree", data: "Tree.as"},
>                   {label: "Button", data: "Button.as"}]},
>               {label: "Core", children:[]}
>           ]};
>      
>
>       ]]>
> </mx:Script>
>
> <mx:Panel>
>       <mx:Tree id="tree" width="300" height="200"
> dataProvider="{fileSystemStructure}"/>
>       <mx:Form>
>             <mx:FormItem label="label">
>                   <mx:TextInput id="lbl" text="{tree.selectedItem.label}"/>
>                   <mx:Button label="update"
click="{tree.selectedItem.label=lbl.text}"/>
>             </mx:FormItem>
>       </mx:Form>
>       <mx:Text text="tree: {tree.selectedItem.label}  form: {lbl.text}"
> width="300"/>
> </mx:Panel>
>
> <mx:Panel>
>       <mx:List id="list" dataProvider="{fileSystemStructure.children}"
> width="300" height="200"/>
>       <mx:Form>
>             <mx:FormItem label="label">
>                   <mx:TextInput id="lbl2" text="{list.selectedItem.label}"/>
>                   <mx:Button label="update"
click="{list.selectedItem.label=lbl2.text}"/>
>             </mx:FormItem>
>       </mx:Form>
>       <mx:Text text="list: {list.selectedItem.label}  form: {lbl2.text}"
> width="300"/>
> </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




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