Re: what is the best way to 'unset' a variable
Re: what is the best way to 'unset' a variable
- Subject: Re: what is the best way to 'unset' a variable
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 25 Mar 2002 13:11:25 -0800
On 3/25/02 12:36 PM, "Michael Sullivan" <email@hidden> wrote:
>
What's the reasoning behind storing globals in the script when it's
>
finished? They go away as soon as it runs again anyway? I've always
>
assumed that if I wanted a variable value to persist, it needed to be in
>
a property.
>
As a script-writer, I find it very handy that all variables not explicitly
declared as local are available in Script Debugger's Properties window when
I open a script. When a script is supposedly finished, and I test it running
in its native habitat (a compiled script ruining from an app's script menu,
or an applet running itself), and it errors due to some bug, I can open the
script in SD and figure it out. Not much use otherwise, but I like this a
lot.
>
Can other scripts still call for the global's value after it is finished
>
running, and it won't be lost until the script is actually run again?
Well, SD knows how to get these values. So I just tried it with 'load
script', and got the value of a top-level variable that was not declared as
property or local or global. It works. (Needless to say, variables from
handlers were not available.)
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.