Re: Global variables
Re: Global variables
- Subject: Re: Global variables
- From: Axel Luttgens <email@hidden>
- Date: Thu, 08 Mar 2007 17:23:41 +0100
On 8/03/07 17:02, Larry the O wrote:
OK, I must be misunderstanding something really basic here.
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.
The actual code is kind of messy right now, so, for the moment,
makePretend code:
on open
global littleMess
global bigMess
global ohMiGod
[...]
Could you try by putting the global statements outside but in front of
the open handler:
global littleMess
global bigMess
global ohMiGod
on open
[...]
On the other hand, perhaps properties would be more appropriate here.
(globals are very strange beasts in AppleScript and, for legibility
reasons, should be avoided whenever possible)
HTH,
Axel
_______________________________________________
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