Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Global variables



This morning, Larry the O wrote:

>All I'm trying to do is create a droplet that starts out by declaring and 
>initializing a bunch of global variables, then runs a series of subroutine 
>calls to do the work. The idea of using the global variables is so that 
>the subroutines can read and write the global variables without them 
>having to be explicitly passed in the subroutine call, right?
>
>Not working. It worked when I was writing the code and running it directly 
>from the script window, but once I added the droplet front end (which was 
>independently tested and seems to work fine), the global variables are no 
>longer working.

I'm far from expert in such matters, but have some recent experience 
combining an open handler with other handlers.

I thought I'd need global variables, but didn't.  Setting properties at 
the top level of the script was all that was needed.  Some were left 
empty, and set later in the script.  Some were set with initial values 
and called or reset later in the script.  Worked fine.

Peter B.

-----

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

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.