Re: [flexcoders] Re: tree multiple select problem

2011-08-06 Thread Alex Harui
Yes, if selectedIDs is a big array, it could take a while to do run the loop. You could try building up a hash table of ids Var hashIDs:Object = new Object; For (var i:int = 0; I < N; i++) hashIDs[selectedIds[i].toString()) = 1; Then query once: var nodes:XMLList = xml.descendants().(hashID

Re: [flexcoders] Re: tree multiple select problem

2011-08-05 Thread Alex Harui
SelectedItems must be an array. If you have: Var xml:XML = Var selectedIds:Array = [2, 4, 5]; Then you need something like: Var selItems:Array = new Array(); For (var i:int = 0; I < n; i+++ { var id:String = selectedIds[i].toString(); var node:XML = xml..node(@id == id)[0];

Re: [flexcoders] Re: tree multiple select problem

2011-08-05 Thread Alex Harui
You will have to make a new array of the nodes you want selected. On 8/4/11 9:45 PM, "steveroger_flex" wrote: I am having list of nodes in array. My problem is how should I use seletedItems with list of node id array.? Data provider of tree component. Node id Array=(2,4,5).