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


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Paul BH
Sent: Tuesday, July 25, 2006 3:25 PM
To: [email protected]
Subject: 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_Parts&file=00001834.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




__,_._,___

Reply via email to