The code below produce a strange results

var ar:ArrayList = new ArrayList;
ar.addItem(new String("some value"));
var index:int=0;
for each (var obj:Object in ar)
{
       index++;
}
trace ( "for each iteration ="+ index);
index =0;
for (var i:int=0;i < ar.length ;i++)
{
       index++;
}
trace ("for iterations =" +index);
                           
the console output : 

16:26:13.431 Language.js:237 for each iteration =52
16:26:13.432 Language.js:237 for iterations =1



The version of SDK is Apache Royale 0.9.3 FP11.7 AIR14.0 en_US (nightBuild)


Spiros 




Reply via email to