0 Replies Latest reply on Jan 24, 2010 8:59 PM by JimHuangHust

    How to define template method or template class in Action Script?


      Action Script doesn't has a "template" key word, but it should support template class. E.G. Vector.<String>.  But when I tried below codes, there are compile errors : Type was not found or was not a compile-time constant: Vector.   



      1) __AS3__.vec.Vector has been imported.
      2) I've set flash player version to 10.  It compiles if I change  Vector<T> to Vector<String>.


             public static function removeAll(vec:Vector.<T>):void
                 while(vec.length !=0)