• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: default arguments/parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >default arguments/parameters (From: "Rua Haszard Morris" <email@hidden>)

  • Prev by Date: Re: case and function names conventions
  • Next by Date: Re: 300% speed discrepancy
  • Previous by thread: Re: default arguments/parameters
  • Next by thread: Re: default arguments/parameters
  • Index(es):
    • Date
    • Thread