Re: Alias Forms as Property
Re: Alias Forms as Property
- Subject: Re: Alias Forms as Property
- From: Michael Terry <email@hidden>
- Date: Sat, 6 Nov 2004 18:26:20 -0800
On Nov 5, 2004, at 9:55 PM, Paul Berkowitz wrote:
You were responding to my message that explicitly said that the reason
for
saving an alias, rather than a string path, was so the script can find
the
file if it's been renamed or moved. Then I added the caveat that that
creates a problem if the file has been deleted. So now we're back to
the
beginning again.
You take your choice. Different problem if you save the existing file
path
or the alias.
It would be nice to be able to save the alias as a property i a way
that
could be trapped if the file has been deleted. But I don't know any
way.
Does this solve the problem, or did I misunderstand?:
--
property supportFile : choose file
init()
on init()
if not (exists supportFile) then set supportFile to (choose file)
return
end Setup
on exists theFile
try
alias (theFile as string)
theFile ≠ ""
on error
false
end try
end exists
--
Michael
_______________________________________________
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