Re: global variables
Re: global variables
- Subject: Re: global variables
- From: Kaydell Leavitt <email@hidden>
- Date: Wed, 17 Jul 2013 14:27:25 -0600
Hi Luther,
On Jul 17, 2013, at 2:13 PM, Luther Fuller < email@hidden> wrote:
Global variables are persistent.
In other words, when you launch an application, the values from the previous launch are remembered.
This means that the application (bundle) is self modifying.
Which, in turn, means that use of global variables will interfere with, for example, codesigning and perhaps other security measures used in Lion or Mt Lion.
For this reason, I never use global variables and never modify a property.
If any of this has changed recently perhaps someone can update us.
I tried a global variable with the following code.
global x set x to 2 set x to x + 1 display dialog "x: " & x
It always displays 3 as the result.
I don't know what you mean about global variables modifying their bundles.
I have read that properties are more persistent than global variables, but I can't say that I understand properties, but I think that I understand global variables. I believe that global variables are defined for the entire script -- even inside of handlers. I thought that this was all that their is to global variables, having the scope of the entire script.
|
_______________________________________________
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