Re: Can a handler return more than one result?
Re: Can a handler return more than one result?
- Subject: Re: Can a handler return more than one result?
- From: Graff <email@hidden>
- Date: Tue, 09 Nov 2004 00:19:55 -0500
As others have shown you (but not actually told you) just return a list
of all the variables you want to return:
----
on doSomething()
set thingOne to 5
set thingTwo to "boo"
return {thingOne, thingTwo}
end
set {firstPart, secondPart} to doSomething()
firstPart
--> 5
secondPart
--> "boo"
----
:-)
- Ken
On Nov 8, 2004, at 7:55 PM, Eric Geoffroy wrote:
I dutifully checked my Neuberg book before asking.
I have a handler that sets two variables. I'd like to return them both
as a result of the handler.
For reasons I don't yet understand, the scope is local and needs to
break out of its little shell.
Declaring both variables as global is an option, but it makes me feel
dirty because of the way the books talks about them.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden