X

Vector.unshift bug已修复

package  
{
    import flash.display.Sprite;
    import flash.system.Capabilities;

    /**
     * www.litefeel.com
     * lite3@qq.com
     * @author lite3
     */    public class VectorTest extends Sprite
    {

        private var list:Vector.<MyClass> = new Vector.<MyClass>();

        public function VectorTest() 
        {
            trace(Capabilities.version);
            var n:int = 3;
            while (n--)
            {
                //list.length++;
                list.unshift(new MyClass());
                trace(list);
            }
        }

    }

}
class MyClass{}

输出:

WIN 10,0,22,87
[object MyClass]
[object MyClass],[object MyClass]
[object MyClass],[object MyClass],[object MyClass]

This post was last modified on 2019 年 03 月 04 日 01:16

This website uses cookies.