relix
03-27-2007, 12:38 PM
I'm making extensive use of LocalConnections, and I would like to override the LocalConnection.send() method in a custom class derived from LocalConnections.
I just need to add a string-id to the connectionName. The problem is "passing through" the (rest) parameters. Since, correct me if I'm wrong, if I do it like this:
override public function send(conName:String, methodName:String, ... args):void
{
super.send(conName + this.id, methodName, args);
}
This would send an array of parameters through, which is wrong. I need something like this:
override public function send(conName:String, methodName:String, ... args):void
{
super.send(conName + this.id, methodName, args[0], args[1], args[2], ...);
}
Anyone has any ideas on how to accomplish this? I hope I explained it well.
I just need to add a string-id to the connectionName. The problem is "passing through" the (rest) parameters. Since, correct me if I'm wrong, if I do it like this:
override public function send(conName:String, methodName:String, ... args):void
{
super.send(conName + this.id, methodName, args);
}
This would send an array of parameters through, which is wrong. I need something like this:
override public function send(conName:String, methodName:String, ... args):void
{
super.send(conName + this.id, methodName, args[0], args[1], args[2], ...);
}
Anyone has any ideas on how to accomplish this? I hope I explained it well.