Re: default arguments/parameters
Re: default arguments/parameters
- Subject: Re: default arguments/parameters
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 08 Oct 2003 22:52:00 -0700
On 10/8/03 9:17 PM, "Rua Haszard Morris" <email@hidden> wrote:
>
Is there a way to define a handler to take default positional parameters?
>
e.g.
>
to displayplaindialog(optional texttoshow = "default text")
>
display dialog texttoshow
>
end
>
>
Is there a way to restrict the types of parameters to handlers? i.e. in the
>
above an error would occur if it was called with texttoshow other than text?
>
>
I get the feeling these things can be done but there is not standard
>
predefined way to do em, and there's no conventional way either (everyone
>
does it their own way).. any conventions out there?
>
>
Thanks again for any suggestions..
I don't understand the question. Could you be more explicit please? Do you
want it error if the wrong class (non-text) is sent? Do you want a
predefined default text to display if the wrong class is sent but otherwise
use the (non-default) text sent. Or what exactly? This is not a problem
either way, but I haven't the faintest idea what you actually want - please
give an example.
--
Paul Berkowitz
_______________________________________________
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.