Re: Error-trapping alias properties
Re: Error-trapping alias properties
- Subject: Re: Error-trapping alias properties
- From: Emmanuel <email@hidden>
- Date: Thu, 28 Mar 2002 18:52:05 +0100
At 8:13 AM +0100 28/3/02, Paul Berkowitz wrote:
>
>
Is there a way to error-trap alias objects saved as script properties, in
>
case the file has been trashed and emptied or the script moved to another
>
computer?
Not that I hope to solve your problem (not even sure that I "got" it ...),
but you may be interested by what happens OMM (OS 9.2.2, AS 1.6).
Here is my applet.
----------------------
property theFile : ""
if theFile is "" then
set theFile to (choose file) as alias
end if
----------------------
I run the applet, and provide a valid alias: alias "Macintosh HD:test file".
Then I trash&empty "test file".
Then I run again the applet. No error, no dialog: the test executes without
error, and it returns "false".
Now, maybe you wonder, to what exactly does "theFile" evaluate now?
Here is the answer I got (no typo): alias "Macintosh HDtest file". As you
would expect, if you test "at hand" that alias, it errors fully.
Does that reflect a way the Classic OS stores a "invalid but don't tell my
mother" alias?
Finally, it looks like Classic and X don't share the same philosophy here.
Emmanuel
_______________________________________________
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.