Re: Property and variable
Re: Property and variable
- Subject: Re: Property and variable
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 3 Nov 2006 11:38:04 -0500
On 11/3/06, Jan Bultereys <email@hidden> wrote:
Ok, does this mean I can not link a variable to a property?
What do you mean "link"? There's no linkage going on. Even if what you were trying to do worked:
set a to 1
property b: a
A later change to a would not affect the value of b, nor vice-versa. They are two separate entities that you have just initialized to the same value.
But properties are defined and initialized before any of the code is actually run. So that doesn't work because the "set a to 1" line has not been run yet (though it's been compiled) at the time that the "property b: a" line is compiled.
Well if I use:
Set "variable1" to "variable2"
It won't be "available" in the handlers.
The fact that handlers can't see "global" variables is generally considered a good thing. :) If your handler needs the value of a variable, why not pass it in as a parameter when you call the handler?
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden