Could you write your Tree subclass in MXML?

 

<mx:Tree xmlns:mx=http://www.macromedia.com/2003/mxml creationComplete=”myRO.someMethod()”>

  <mx:RemoteObject id=”myRO” … />

  <mx:dataProvider>{myRO.someMethod.result}</mx:dataProvider>

 

  <mx:Script>

    //my functions go here

  </mx:Script>

</mx:Tree>

 

You could drop a Model/XML in there in the meantime if you wanted.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Libby
Sent: Wednesday, June 22, 2005 6:24 AM
To: [email protected]
Subject: [flexcoders] Extending Tree - setDataProvider()?

 

I am extending the Tree and am attempting to assign a model and a
dataProvider via methods on the tree, hopefully executed from the
constructor. I can't figure out how to declare a Model within the
class definition since it is not a class, and setting the dataProvider
doesn't work either. Although the lines below compile, neither one
does anything.
this.setProperty("dataProvider","myData.xml");
this.dataProvider = "myData.xml";
Although I am using flat files here, ultimately the data would come
from a remoteObject when the tree is instantiated.

Could someone give me a gentle nudge in the right direction on this?
The MM doco on Tree, TreeDataProvider, etc. is sparse and provides no
examples.

Thanks,
Libby






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

Reply via email to