I\'ve got a function wich can accept a varible number of parameter with a rest operator.
I want create an object passing the argument collected with the rest opera
I'm searching for the answer too, but too sad to see the answer is no....
Here's my current (not so good) way to do this kind of stuff, hope some of you interest:
// Foo.as
public class Foo {
// construct
public function Foo(... args):void {
create.apply(this, args);
}
// this function do as a really construct function, tricky stuff
function create(id:uint, name:String) {
trace(id, name);
}
}
// Bar.as
// for create this kind of class, just new it as usual
...
var foo:Foo = new Foo(123, "abc");
...