• 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
As Alias List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

As Alias List


  • Subject: As Alias List
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 20 Nov 2009 13:17:02 -0600

I've just wasted a couple of hours trying to discover why an old script is soooo slow. It's still slow, but I discovered a problem in this snippet of code ...

set prefFileList to (sort items of prefsRef by name) as alias list
repeat with itemRef in prefFileList
select itemRef

It was throwing an error every time I tried to run it. Finally, I inserted a diagnostic only to discover that the items of the list prefFileList are not aliases, but references. So I inserted one line ...

set prefFileList to (sort items of prefsRef by name) as alias list
repeat with itemRef in prefFileList
set itemRef to (itemRef as alias)
select itemRef

and now it runs properly.

So, what's wrong with as alias list ?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: As Alias List
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: iTunes script problems
  • Next by Date: Re: iTunes script problems
  • Previous by thread: Re: Ordering names
  • Next by thread: Re: As Alias List
  • Index(es):
    • Date
    • Thread