Re: Optional parameters in Handlers????
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.