Re: Error-trapping alias properties
Re: Error-trapping alias properties
- Subject: Re: Error-trapping alias properties
- From: Andy Wylie <email@hidden>
- Date: Sat, 30 Mar 2002 21:41:24 +1200
on 30/3/02 5:53 PM, Paul Berkowitz at email@hidden wrote:
>
However, as Emmanuel said, 'fully resolving' by FIRST coercing the alias to
>
string, then trying to coerce the string back to an alias, is what work:
;)
>
try
>
set theFile to contents of fileRef
>
set filePath to theFile as string
>
get alias filePath
>
on error
>
display dialog "You trashed the file."
>
set theFile to choose file
>
set fileRef to a reference to theFile
>
end try
>
That, at last, results in "You trashed the file" both on the same computer
>
and also when moving the script to another computer, both in OS 10.1.3 and
>
9.2.2 (AS 1.8.2b3 on both).
>
>
Thanks to all who contributed. A successful conclusion.
aw c'mon!, spot the difference...
------------------
property someFile : "excuse me"
try
(someFile as string) as alias
display dialog someFile as text
on error
set someFile to choose file with prompt "%0 isagonner-->" & (someFile)
end try
------------------
do you need the reference?
Can you confirm this will or not suffice?
_____________sighmon
_______________________________________________
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.