pass ...rest to a NetConnection call
Posted
by dome
on Stack Overflow
See other posts from Stack Overflow
or by dome
Published on 2010-06-08T17:52:36Z
Indexed on
2010/06/09
1:22 UTC
Read the original article
Hit count: 280
I want to pass a rest in a netconnection call, something like this:
public function requestData(service : String, ...params) : void
{
nc.call(service, params);
}
this doesn't work since the call is expecting each parameter to be separated by commas, like:
nc.call(service, params[0], params[1], params[2]);
I've read some posts about apply, but I can't find a solution for this specific case.
© Stack Overflow or respective owner