Re: Script Object Order in Script
Re: Script Object Order in Script
- Subject: Re: Script Object Order in Script
- From: Arthur J Knapp <email@hidden>
- Date: Tue, 24 Jul 2001 17:41:01 -0400
>
Date: Tue, 24 Jul 2001 14:44:09 -0400
>
From: "Marc K. Myers" <email@hidden>
>
Subject: Re: Script Object Order in Script
>
> script aaa
>
> property whatever : "aaa"
>
> end script
>
>
>
> on CheckScriptProperties()
>
> whatever of aaa --> "aaa"
>
> whatever of zzz --> error "The variable zzz is not defined."
>
> end CheckScriptProperties
>
>
>
> script zzz
>
> property whatever : "zzz"
>
> end script
>
>
>
> CheckScriptProperties()
>
> It seems to me that after the script has been compiled, all
>
> script objects defined at the top-level of the script should
>
> be just as "global" as all handler definitions.
>
The difference is that the script object doesn't come into being until
>
its code is executed. This initializes the script object. Handlers, by
>
contrast, come into existence when the script is compiled.
But what do you mean by "executed"? There are only 2 points at which
something can come into existence, run-time and compile-time:
script aaa
property whatever : "aaa"
end script
on run
whatever of aaa --> "aaa"
whatever of zzz --> "zzz"
end run
script zzz
property whatever : "zzz"
end script
The bottom script doesn't come into being in the normal run-time
sense, because it isn't a part of the run-sequence. I think that this
issue must be related to how the compiler works, at compile-time.
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://homepage.mac.com/richard23/