[flexcoders] How to pass optional arguments to a function in Flex 2?

2006-07-25 Thread Artur Kordowski





In Flex 1.5 there 
was a way to create a function and pass optional arguments to it, and get them 
in the function using arguments[0].

private function 
foo():Void
{
 
var arg = arguments[0];
}

When I try it to do 
in Flex 2 I've got still an 'Inccorect number of arguments' 
error.
Have anyone an idea 
how I can do it in Flex 2?

Thanks, 
Artur
__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   



  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] How to pass optional arguments to a function in Flex 2?

2006-07-25 Thread Paul BH



you need to use the 'rest' parameter its an ellipsis (...)details here:http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1834.html
On 7/25/06, Artur Kordowski [EMAIL PROTECTED] wrote:













  






In Flex 1.5 there 
was a way to create a function and pass optional arguments to it, and get them 
in the function using arguments[0].

private function 
foo():Void
{
 
var arg = arguments[0];
}

When I try it to do 
in Flex 2 I've got still an 'Inccorect number of arguments' 
error.
Have anyone an idea 
how I can do it in Flex 2?

Thanks, 
Artur

  















__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   



  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] How to pass optional arguments to a function in Flex 2?

2006-07-25 Thread Artur Kordowski





Thanks a lot Paul, that's exactly that what I'm looking 
for.

Artur


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Paul BHSent: 
Tuesday, July 25, 2006 3:25 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] How to pass 
optional arguments to a function in Flex 2?
you need to use the 'rest' parameter its an ellipsis 
(...)details here:http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1834.html 

On 7/25/06, Artur 
Kordowski [EMAIL PROTECTED] 
wrote:

  
  
  
  
  
  
  In Flex 1.5 there was a way to create a 
  function and pass optional arguments to it, and get them in the function using 
  arguments[0].
  
  private function 
  foo():Void
  {
   var arg = 
  arguments[0];
  }
  
  When I try it to do in Flex 2 I've got 
  still an 'Inccorect number of arguments' error.
  Have anyone an idea how I can do it in 
  Flex 2?
  
  Thanks, Artur
   
__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___