• 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: Optional parameters in Handlers????
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optional parameters in Handlers????


  • Subject: Re: Optional parameters in Handlers????
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Sun, 13 Apr 2003 09:44:59 +1000

Hi All.

It seems like this is not possible, but if I'm wrong, I would like to
be corrected (and guided)..

Is it possible to have optional parameters in handlers?
Like:

on myHandler(param1, [optional_1], [optional_n])

end myHandler

Try sending either a list or a record to the handler

myHandler ({name:"malcolm", last:"fitzgerald", course:"AppleScript"})
-- send two values in one record to the handler

on myHandler (studentRecord)
-- one parameter: a record with any number of keys
-- add all optional elements to the record
set completeRecord to {name:"", last:"", course:"", teacher:"", time:"", dayOfWeek:"", cost:"", classroom:""}
set studentRecord to studentRecord & completeRecord
--
-- now go ahead and use the record

end

--
--
Malcolm Fitzgerald email@hidden
Database Manager http://www.asauthors.org
The Australian Society of Authors ph: 02 93180877 fax: 02 93180530
_______________________________________________
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: 
 >Optional parameters in Handlers???? (From: Jakob Peterhänsel <email@hidden>)

  • Prev by Date: Re: Sort by numerical order
  • Next by Date: Re: Optional parameters in Handlers????
  • Previous by thread: Optional parameters in Handlers????
  • Next by thread: Re: Optional parameters in Handlers????
  • Index(es):
    • Date
    • Thread