• 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: global variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: global variables


  • Subject: Re: global variables
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 17 Jul 2013 14:55:21 -0400

Why not declare a data storage class/script and reference it from your main script?

That's what we do in Objective C.


On Jul 17, 2013, at 2:49 PM, Jim Brandt wrote:

> Is there a downside to using global variables?
>
> I have several lists of data that I need across several handlers. This data has been loaded from several .plist files in the main script. I then need this data in the handlers being called by the main script.
>
> Am I better off making the lists global at the top level and then have them available in the handlers or re-reading the .plist files in each handler or pass them in through the argument list (I really don't want to do this because the argument list gets quite long)?
>
> Are the significant advantages of one method over another?
>
> TIA,
>
> Jim Brandt
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: global variables
      • From: Jim Brandt <email@hidden>
References: 
 >global variables (From: Jim Brandt <email@hidden>)

  • Prev by Date: global variables
  • Next by Date: Re: global variables
  • Previous by thread: global variables
  • Next by thread: Re: global variables
  • Index(es):
    • Date
    • Thread