• 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 (Was: Applescript-users Digest, Vol 1, Issue 177, Message 3)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alias Forms as Property (Was: Applescript-users Digest, Vol 1, Issue 177, Message 3)


  • Subject: Re: Alias Forms as Property (Was: Applescript-users Digest, Vol 1, Issue 177, Message 3)
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 05 Nov 2004 21:55:05 -0800

On 11/5/04 9:20 PM, "Jonathan Levi MD" <email@hidden> wrote:

> On Fri, 05 Nov 2004 09:29:51 -0800, Paul Berkowitz <email@hidden>
> 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...
>
> As a mostly-lurker to this list, I hesitate to
> put in a word before this august company;
> however, my solution to the above has been to
> save the path as a string (could be Unicode text,
> I suppose) then at the start of a script, have
> this try block:
>
> on verifyPath()
>    try
>      alias <the path property>
>    on error
>      set <the path property> to ((choose file with prompt ¬
>        ("Can't locate "" & <file name> & ¬
>          "". Where is it, please?")) as string)--or Unicode text(?)
>    end try
> end verifyPath
>
>
Well, obviously. But then that doesn't find a saved alias that's been
renamed or moved, except by choose file. Fine, that's one way.

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.

--
Paul Berkowitz


 _______________________________________________
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

  • Follow-Ups:
    • Re: Alias Forms as Property
      • From: Michael Terry <email@hidden>
References: 
 >Re: Alias Forms as Property (Was: Applescript-users Digest, Vol 1, Issue 177, Message 3) (From: Jonathan Levi MD <email@hidden>)

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