Greetings!

I'm encountering some strange behavior, and I was wondering if anyone
could explain the results for me. The code below:
<?xml version="1.0" encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
creationComplete="init()">  <mx:Script>   <![CDATA[    import
mx.collections.ArrayCollection;        [Bindable]    public var
cards:ArrayCollection = new ArrayCollection([ {label:"Visa", data:1,
children:[{label:1, data:1}, {label:2, data:2}, {label:3, data:3}]},
{label:"MasterCard", data:2, children:[4, 5, 6]}, {label:"American
Express", data:3}, 5 ]);        public function init():void    {     var
temp:Object = new Object();     temp.selectedIndices = [1,2];         
trace("::", temp.selectedIndices, "::");     tree.selectedIndices =
temp.selectedIndices;     trace("::", temp.selectedIndices, "::");    }
]]>  </mx:Script>      <mx:Tree id="tree" height="142"
dataProvider="{cards}" editable="true"
allowMultipleSelection="true"></mx:Tree> </mx:Application>
Traces out to:
:: 1,2 :: ::  ::
I would have expected the second trace to match the first one, however
that doesn't seem to be the case. Does anyone have any insight on this?

Thanks!

-Mac

Reply via email to