Hi List,
How can I pass a variable amount off function arguments to a next function ?
Below the way I tried and which fails. While passing them they get combined
I'd like to remain 5 variables for args_B and not a single string.
Stijn
CODE:
testargs( a,b,{z:'zz'},[1,2,3],c )
private function
I think I tried something with casting to array or using Function.apply, I'm
pretty sureFunction.apply or call does the trick
after messing around with it I decided it wasnt worth the mess and used
array's instead..
On Fri, Nov 28, 2008 at 4:18 PM, Latcho [EMAIL PROTECTED] wrote:
Hi List,
You can accept them as an Array, e.g.:
public function passingArgs(argsB:Array):void {
trace(#args_B:,argsB.length);
for(var i:int=0;iargsB.length;i++) { trace(argsB[i]); }
}
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Latcho wrote:
Hi List,
How can I pass a variable amount off
Ooh! Ooh! I just wrote this a few days before you asked. Here's my
solution:
public function call( rpcName: String, responder: Responder,
rpcArgs: Array ): void {
// NetConnection.call() takes a variable number of arguments after the
// RPC
And there is also the ...rest-option
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
Kawamoto
Sent: vrijdag 28 november 2008 16:57
To: [EMAIL PROTECTED]; Flash Coders List
Subject: Re: [Flashcoders] passing on ... args
You can accept them
Oops, I did saw this one.
Sorry
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Hershberger
Sent: vrijdag 28 november 2008 17:39
To: Flash Coders List
Subject: Re: [Flashcoders] passing on ... args
Ooh! Ooh! I just wrote this a few days before
PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kenneth
Kawamoto
Sent: vrijdag 28 november 2008 16:57
To: [EMAIL PROTECTED]; Flash Coders List
Subject: Re: [Flashcoders] passing on ... args
You can accept them as an Array, e.g.:
public function passingArgs(argsB:Array):void {
trace(#args_B
7 matches
Mail list logo