Re: AppleScript-Users Digest, Vol 13, Issue 279
Re: AppleScript-Users Digest, Vol 13, Issue 279
- Subject: Re: AppleScript-Users Digest, Vol 13, Issue 279
- From: Mitchell L Model <email@hidden>
- Date: Wed, 29 Jun 2016 12:29:07 -0400
> On Jun 25, 2016, at 10:30:16, Shane Stanley <email@hidden>wrote:
>
>
> The difference is due to the fact that code in property declarations is compile separately, not as part of the overall (until then non-existent) script, at compile time.
OK, that helps. But allow me tangle this up a bit more:
property pathToMe1 : path to me -- (1)
property pathToMe2 : missing value -- (2)
property Top : me -- (3)
property pathToTopMe : path to Top -- (4)
set pathToMe2 to path to me --(5)
set pathToTop to path to Top -- (6)
(*
(a) pathToMe1: path to Script Debugger
(b) pathToMe2: path to this script
(c) pathToTopMe: path to Script Debugger
(d) pathToTop: path to this script
*)
Your response explains why:
(1) causes (a)
(2) and (5) cause (b)
(3) and (4) cause (c) (I think: since at the time the properties are being defined, (3) Top is SD
so "path to Top” should be the path to SD
But how does (d) happen? (6) “path to Top” should be the path to the value of Top, which
is D, so I would think (d) would be path to SD. Another way to look at this is that (4) and (6) say
the same thing: “path to Top”. How can Top’s value be SD in one place and the script in another?
I understand now that during compilation of the properties “me” should be the compiler.
But that means that Top’s gets set to the compiler. However, a later reference to Top apparently
references the script, not the compiler, which seems magical.
_______________________________________________
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