开发者

How to Increase Vector length to 200 after new Vector.<String>(100);

HI All,

//Created Vector with the initial length of 100.

var v:Vector. = new Vector.(100);

v[90] = "Nin开发者_如何转开发ety"

v[190] ="oneninety" //RangeError: Error #1125: The index 110 is out of range 100.

//How to change the length from 100 to 200 to store a value at index 190 ?


To change the size of a Vector you just set the length property. eg:

v.length = 200;
v[190] = "something"; // works now
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜