Re: [flexcoders] function foo(... args) { ;}

2008-07-16 Thread Sid Maskit
args is already an array:

function foo(... args) 
{
for (var i:int = 0; i < args.length; i++)
{
trace(i + ": " + args[i]);
}
}



- Original Message 
From: Manu Dhanda <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 15, 2008 11:17:12 PM
Subject: RE: [flexcoders] function foo(... args) { ;}



You mean to say:
function foo(... args) 
{
var myArgs:Array = Array(args);
}

Am I right here??

Thanks,
Manu.

Rick Winscot-2 wrote:
> 
> You can treat args as an array.
> 
> 
> 
> Rick Winscot
> 
> 
> 
> 
> 
> From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On
> Behalf Of Manu Dhanda
> Sent: Wednesday, July 16, 2008 1:56 AM
> To: [EMAIL PROTECTED] ups.com
> Subject: [flexcoders] function foo(... args) { ;}
> 
> 
> 
> 
> How to access the parameters passed in the function like this:
> 
> function foo(... args) 
> {
> // How to access the passed arguments here.
> }
> 
> Thanks.
> -- 
> View this message in context:
> http://www.nabble. com/function- foo%28... -args%29- %7B--%7D- 
> tp18480729p18480 72
> 9.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble. com/function- foo%28... 
-args%29- %7B--%7D- tp18480729p18480 961.html
Sent from the FlexCoders mailing list archive at Nabble.com.




  

RE: [flexcoders] function foo(... args) { ;}

2008-07-15 Thread Manu Dhanda

You mean to say:
function foo(... args) 
{
 var myArgs:Array = Array(args);
}

Am I right here??

Thanks,
Manu.


Rick Winscot-2 wrote:
> 
> You can treat args as an array.
> 
>  
> 
> Rick Winscot
> 
>  
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Manu Dhanda
> Sent: Wednesday, July 16, 2008 1:56 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] function foo(... args) { ;}
> 
>  
> 
> 
> How to access the parameters passed in the function like this:
> 
> function foo(... args) 
> {
> // How to access the passed arguments here.
> }
> 
> Thanks.
> -- 
> View this message in context:
> http://www.nabble.com/function-foo%28...-args%29-%7B--%7D-tp18480729p1848072
> 9.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/function-foo%28...-args%29-%7B--%7D-tp18480729p18480961.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] function foo(... args) { ;}

2008-07-15 Thread Rick Winscot
You can treat args as an array.

 

Rick Winscot

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Manu Dhanda
Sent: Wednesday, July 16, 2008 1:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] function foo(... args) { ;}

 


How to access the parameters passed in the function like this:

function foo(... args) 
{
// How to access the passed arguments here.
}

Thanks.
-- 
View this message in context:
http://www.nabble.com/function-foo%28...-args%29-%7B--%7D-tp18480729p1848072
9.html
Sent from the FlexCoders mailing list archive at Nabble.com.

 



[flexcoders] function foo(... args) { ;}

2008-07-15 Thread Manu Dhanda

How to access the parameters passed in the function like this:

function foo(... args) 
{
  // How to access the passed arguments here.
}


Thanks.
-- 
View this message in context: 
http://www.nabble.com/function-foo%28...-args%29-%7B--%7D-tp18480729p18480729.html
Sent from the FlexCoders mailing list archive at Nabble.com.