Re: FADE DEAD
Re: FADE DEAD
- Subject: Re: FADE DEAD
- From: Christopher Nebel <email@hidden>
- Date: Fri, 15 Mar 2002 14:30:36 -0800
On Thursday, March 14, 2002, at 07:06 PM, Jon Pugh wrote:
Oh yeah, the other thing the beginning tag does is tell the generic
component
which script component should be used to run the script.
Actually, the ending tag specifies the script component sub-code. The
beginning tag is purely for the use of AppleScript itself; a scripting
component is not obliged to have one.
On Friday, March 15, 2002, at 01:43 AM, JJ wrote:
Then, another question relative to storage. Why does it store full paths
when you make a reference to a file or when using a tell block.
What it's actually storing is an alias record. Aliases contain
information to find the relevant file in a number of different ways, one
of which is a full path. In theory, there's enough other information to
locate the file even if the full path doesn't work.
And about storing properties... An example:
property x : read (":file.txt" as alias)
-- "file.txt" contains word "HELLO"
display dialog x
Obviously, when I delete the "file.txt", the script runs as normally,
and
displayes dialog "HELLO".
So, embedding commands into properties only work at compile time?
Property definitions are evaluated once (and only once) at compile
time. If you want something that's re-evaluated every time, use a
handler.
Then, what's the difference between
property x : read (":file.txt" as alias)
&
property x : "HELLO"
Assuming that file.txt contains the text "HELLO" and not the
Never-Ending Story, nothing aside from how long it takes to compile.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.