I have trouble with ArrayCollection
in Flex. Here is my code:
private var productPageArr:ArrayCollection;
private var productCount:Number = 10;
private function dviceProductPage(arr1:ArrayCollection,arr2:ArrayCollection):ArrayCollection
{
var page:Number = arr1.length //productCount;
var i:int;
arr2 = new ArrayCollection();
//productPageArr = new ArrayCollection();
for(i = 0; i<page; i++)
{
var o:Object = new Object();
o.label = String(i+1);
arr2.addItem(o);
}
//arr2.refresh();
return arr2;
}
When I run this block of code, my application is terminated. But when productPageArr
is replaced with arr2
then my application runs smoothly.