That means you are trying to assign a complex object to a display component that needs text.
You will want to define the labelField property if the data you want for the label is a first level property of your node. If the data you want for the label consists of more than one property, or the property is located on some nested property, you will need a labelFunction() Tracy -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Thursday, October 13, 2005 2:00 PM To: [email protected] Subject: [flexcoders] Re: tree, remoteobject, VO, and isBranch ok, suddenly, yes suddenly, I started getting the nifty arrow next to each item. Removing isBranch from my VO makes it go away. kewl. But now all items appear as [object Object],1, , [object Object] oddness...one of those days...with MAX on my mind I'm probably missing some silly thing. DK On 10/13/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote: > Ok, I am building a tree using a remoteobject call to get the data for > it. The data returned is an array of VOs. The result is only one > level deep, the top level of the tree. I plan to dynamically build > child nodes via the change event. The data is a list of US states. > When I click a state I want to fetch data and build child nodes for > the sate, this part I can do. Now, I want the initial tree to have > the clickable drill-down arrow thingy. How do I get that? I'm > getting the default icon in the tree for a childless node. I added > isBranch to my VO, but does not seem to help. Someway to cast the VO > onto a node or something? > > brief code snip... > > var states : Object; > > public function getStates() > { > EventBroadcaster.getInstance().broadcastEvent( > AOPSchedulerController.EVENT_GETALLSTATES ); > > } > ]]> > </mx:Script> > > <mx:Tree height="100%" dataProvider="{ states }" labelField="state" > value="stateID" > change="mx.core.Application.alert( > event.target.selectedItem.getProperty('stateID'))" > > > </mx:Tree> > </mx:VBox> > > > my VO def > > class com.alltel.rapid.aopscheduler.vo.StateVO { > > public var stateID : String; > public var state : String; > public var isBranch : Boolean = true; > > > > > public function StateVO(stateID : String, state : String) > { > this.stateID = stateID; > this.state = state; > } > > > public static var registered:Boolean = Object.registerClass( > "com.foo.aopscheduler.vo.StateVO", StateVO ); > > > } > > > -- > Douglas Knudsen > http://www.cubicleman.com > this is my signature, like it? > -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? -- 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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/

