Re: variables vrs properties
Re: variables vrs properties
I guess the only other distinction (although a very significant one) that I failed to mention earlier is the initial property value is evaluated (and applied) at compile time whereas a variable isn't evaluated until run-time.
Actually, no. The initial property value is set at runtime, before the runhandler executes.
Nothing actually executes at compile time.
In this example, the first time you run the script you're asked to navigate to a file. Not when you compile, when you run.
The second time you run it the values are set and you're not asked to navigate.
ES
property getStarted : (choose file) property pathAsText : getStarted as text on run
display dialog getStarted as text display dialog pathAsText
set pathAsText to "Hello" display dialog pathAsText end run
|
_______________________________________________
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