• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Alias Forms as Property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Alias Forms as Property (Was: Applescript-users Digest, Vol 1, Issue 177, Message 3) (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Bridge anyone? [not off topic]
  • Next by Date: Re: Bridge anyone? [not off topic]
  • Previous by thread: Re: Alias Forms as Property (Was: Applescript-users Digest, Vol 1, Issue 177, Message 3)
  • Next by thread: Orphaned disk error fixed in 10.3.6
  • Index(es):
    • Date
    • Thread