Re: Property and variable
Re: Property and variable
- Subject: Re: Property and variable
- From: Jan Bultereys <email@hidden>
- Date: Fri, 03 Nov 2006 18:20:39 +0100
- Thread-topic: Property and variable
Title: Re: Property and variable
Sorry for the “link” word .... English is not my mother language... I meant set the value (or content) to a variable...
set theFoldersinput to read DATAFILE as list
set the theFolders to theFoldersinput
on findTheFile(PictureName)
set the theFolders to theFoldersinput
end findTheFile
What would you suggest to make the variable theFolders available in the handler?
Many thanks
jan
From: "Mark J. Reed" <email@hidden>
Date: Fri, 3 Nov 2006 11:38:04 -0500
To: Jan Bultereys <email@hidden>
Cc: "email@hidden" <email@hidden>
Subject: Re: Property and variable
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