Pay for Hesitation: Vector Initialization with an Inline Array as Source

Pages

2010年10月21日 星期四

Vector Initialization with an Inline Array as Source

private const vec:Vector.<Number> = new Vector.<Number>( [0.1, 0.2, 0.3, 0.4] );
The Vector initialization fails silently, i.e. the compiler will not throw any error during the compile time, when you put the identifier "new" prior to the Vector initialization statement.

沒有留言: