• 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: kai <email@hidden>
  • Date: Sun, 7 Nov 2004 12:53:41 +0000


On Fri, 05 Nov 2004 09:29:51 -0800, Paul Berkowitz originally wrote:

...If you save the alias form as a property, then the user can
move the file around, rename it, and so on, and the script still finds the
file. (There is a liability though: if the file has been deleted, the
property declaration causes an error _even if_ you think you have prepared
for this case by a try/error block to get the alias in the script...

Since I couldn't recall this issue in OS 9, I checked back, just out of curiosity.


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.

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...

In OS 9* though, the script manages to reopen in compiled format - and an error occurs only when running or recompiling it. This would allow such an error to be trapped at runtime - which, for my money, seems preferable for most purposes...

(* Just in case the behaviour varies elsewhere: OS 9 = OS 9.1 / AS 1.8.3, OS X = OS 10.2.8 / AS 1.9.1)

---
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


  • Prev by Date: Re: Timeouts & FileMaker Scripts
  • Next by Date: Re: Alias Forms as Property
  • Previous by thread: Re: Alias Forms as Property
  • Next by thread: Re: Alias Forms as Property
  • Index(es):
    • Date
    • Thread