rfkrocktk
05-22-2008, 12:43 AM
Hi, I'm trying to extend the functionality (not extend the class itself) of the netconnection.call() function by enclosing a netconnection instance in a class.
What I'm attempting to do is have a function that I have defined as "call" make a call to mynetconnection.call("", null, ...rest). For example:
public function call(method:String, ...rest):void {
this.mync.call(method, null, rest);
}
I have tried repeatedly to do this, and it's not working. The rest parameter feeds the parameters into an array, but is there any way to undo that on the inside of the method and pass a pseudo-list of parameters to nc.call() so that it will see it correctly?
Is it possible to duplicate the functionality of a ...rest parameter into another function?
- TK
What I'm attempting to do is have a function that I have defined as "call" make a call to mynetconnection.call("", null, ...rest). For example:
public function call(method:String, ...rest):void {
this.mync.call(method, null, rest);
}
I have tried repeatedly to do this, and it's not working. The rest parameter feeds the parameters into an array, but is there any way to undo that on the inside of the method and pass a pseudo-list of parameters to nc.call() so that it will see it correctly?
Is it possible to duplicate the functionality of a ...rest parameter into another function?
- TK