Re: Alias Forms as Property
Re: Alias Forms as Property
- Subject: Re: Alias Forms as Property
- From: kai <email@hidden>
- Date: Sun, 7 Nov 2004 21:37:17 +0000
On Sun, 07 Nov 2004 08:38:03 -0800, Paul Berkowitz wrote:
On 11/7/04 4:53 AM, "kai" <email@hidden> wrote:
> When a file is deleted, it seems the alias path was/is modified to
> remove the colon separator between the volume name and the next
folder
> in the path. So alias "Macintosh HD:Users:rest:of:path..." would
become
> alias "Macintosh HDUsers:rest:of:path..." Clearly, any attempt to
> compile an incomplete/inaccurate path like this would normally result
> in an error at compile time.
I have seen too that but only, I think, for locations on the startup
disk.
Here's what a location on a (now non-existent) other partition looks
like:
alias "/Volumes/Data HD/Microsoft User Data/Entourage Script Menu
Items/Split Recipients X"
The ":" separators have been replaced by Unix-type slashes! I've seen
this
many times.
Very interesting. My regular mode of working hasn't highlighted this
for me, but the information does offer an insight into how the data
might be stored...
> When, after deleting a targeted file, I reopen a saved script in OS
X*,
> it opens as unformatted text. So compiling or attempting to run it
will
> also result in the above compile time error...
That may be true in Script Editor (is this SE 1.9 if you're in OS
10.2.8?),
or scripts made in Script Editor, but it is not true in Script Debugger
3.0.8 in OS 10.3.6, nor was it so in 10.2.8. The scripts open as
compiled,
and it's a feature of SD that one can see the current values of
properties
and other top-level variables displayed in the "Properties" tab.
You're right, Paul. It's editor-dependent - and I should have clarified
what I was using at the time. In fact, I was describing the behaviour
of Script Editor 2 Beta. SE version 1.9 functions pretty much the same
as what I described for OS 9. I recall that you generally use SD, which
would also help to explain the slightly different behaviour that you
originally described.
My most recent experiences with this bug were with scripts which had
been
move from one of my computers to the other, where the partitions are
named
differently. The only one I have left is the one I quote above, where
the
previous location was on a non-startup partition. I was able to open
the
script in Script Debugger and copy and paste that strange location with
slashes here. (That's the same way it shows in an error message if I
try
running the script.)
It looks as if aliases are converted to some Unix format for storing
in the
resource, and then recompiled back to AppleScript format when running a
script. This can't be done with a saved alias that no longer exists,
hence
the error in OS X but not 9.
From your description, it looks like that could well be the case.
I note that an alias form with an empty path string, < alias "" >,
actually compiles successfully here - and will error only when run). In
some ways, it might be useful if such a value could be assigned to a
deleted file - since that should offer a chance of testing for its
existence with a try block, at runtime...
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden