"...it must enter this method as an XMLNode.." Can you explain why that
is so?.  The XML API is much more powerful than the obsolete classes.
True it lacks a few convenience properties/ methods like "nextSibling",
but these are easily added.  I just want you to be sure of your choice,
because I think you are hitching your wagon to a near dead horse.

 

Also, you DO have a root node in your xml, you just chose to not have
one in your XMLListCollection.

 

But if you are happy, I'm happy.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of hmmmbeer3
Sent: Tuesday, January 22, 2008 9:49 PM
To: [email protected]
Subject: [flexcoders] Re: Tree and ITreeDataDescriptor

 

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> No, you don't, I see you are converting it to e4x XML. First, skip 
that
> step. Set resultFormat="e4x" on the WebService tag.
> 
> 
> 
> Change your test snippet:
> 
> treeData:XML = 
> <Rows>
> 
> ...
> 
> </Rows>
> 
> 
> 
> Then:
> 
> //////skip this var treeData:XML = new XML(ROWS.toString());
> //////skip this myData = new XMLListCollection(treeData.Row);
> 
> 
> this.dataProvider= treeData; //is this code in a component that 
extends
> mx:Tree? So "this" is a tree?
> 
> 
> 
> This will produce a tree with a "Rows" root node. Set 
showRoot="false"
> on the tree to prevent that.
> 
> 
> 
> Now:
> 
> var xlChildren:XMLList = treeData.children();
> 
> 
> 
> myTree.expandItem(xlChildren[0]); //will expand the first child
> 
> 
> 
> See the example I posted earlier in this thread for an example how 
to
> search for an id and expand that node. Bacically it is:
> 
> var xmlSelect:XML = treeData.row.(@id=="3")[0];
> 
> myTree.expandItem(xmlSelect); //will expand the row with id==3;
> 
> use ".." or "descendants" to go arbitrarily deep in the tree.
> 
> 
> 
> 
> 
> Tracy
> 
The WebService call is actually returning a lot of data, that is 
picked apart by a framework and dispatched to various controls. So 
it must enter this method as an XMLNode.

And remember, this control is now working - I am just curious as to 
whether the current default implementation of getChildren is at all 
useful in a case with no root - or is that a bug/limitation I should 
lodge?

Cheers,

Radek

 

Reply via email to