Re: Deafult or optional arguments to handlers
Re: Deafult or optional arguments to handlers
- Subject: Re: Deafult or optional arguments to handlers
- From: Olof Hellman <email@hidden>
- Date: Mon, 22 Apr 2002 13:22:48 -0700
>
In writing a bunch of mods, I'm realizing that I'd really like a way to
>
give clients the opportunity to call a function with optional
>
parameters. Is there any way to do this, other than making the
>
parameter a list or record and then looking through it?
>
>
I'd like to able to write a function that normally takes a single number
>
argument, but behaves differently if there are two arguments, etc.
>
>
Is having the client pass a list or record for the multiple parameter
>
option, the only way?
>
>
Overloading or default arguments would really be a nice feature, don't
>
you think?
Trivial and elegant if you write a scriptable application. The default
arguments can also be scriptable.
In the case of an applet, using a record for the parameters is the best way
to go.
- Olof
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.