• 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: Can a handler return more than one result?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a handler return more than one result?


  • Subject: Re: Can a handler return more than one result?
  • From: John Stewart <email@hidden>
  • Date: Tue, 9 Nov 2004 04:55:46 -0500

On 11/08/04 at -0800 Eric Geoffroy said this

>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.


set foo to my hndle(1)
foo
--> {2, 3}


on hndle(var)
    set var1 to var + 1
    set var2 to var + 2
    return {var1, var2}
end hndle

JBS
--
 _______________________________________________
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

References: 
 >Can a handler return more than one result? (From: Eric Geoffroy <email@hidden>)

  • Prev by Date: Re: Can a handler return more than one result?
  • Next by Date: Re: Script Libraries
  • Previous by thread: Re: Can a handler return more than one result?
  • Next by thread: Changing the "forward" tear line
  • Index(es):
    • Date
    • Thread