Lone wolf
June 10th, 2008, 11:54 AM
Greetings!
I've banging my head against the wall for a few days now about this problem:
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
public var myArr:ArrayCollection = new ArrayCollection(new Array("1","2","3","4","5"));
public var myTest:ArrayCollection = new ArrayCollection()
public function init():void{
myTest = new ArrayCollection(myArr.source);
myTest.removeItemAt(2);
trace(myTest.length);
trace(myArr.length);
}
]]>
</mx:Script>
</mx:Application>
the code above results in an output of
Code:
4
4
But I want it to result in
Code:
4
5
I've banging my head against the wall for a few days now about this problem:
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
public var myArr:ArrayCollection = new ArrayCollection(new Array("1","2","3","4","5"));
public var myTest:ArrayCollection = new ArrayCollection()
public function init():void{
myTest = new ArrayCollection(myArr.source);
myTest.removeItemAt(2);
trace(myTest.length);
trace(myArr.length);
}
]]>
</mx:Script>
</mx:Application>
the code above results in an output of
Code:
4
4
But I want it to result in
Code:
4
5