• 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: faulty logic, mine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: faulty logic, mine


  • Subject: Re: faulty logic, mine
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 16 Sep 2009 15:36:49 -0500

On Sep 16, 2009, at 2:38 PM, Michelle Steiner wrote:

On Sep 16, 2009, at 12:07 PM, Luther Fuller wrote:

returns a list of item references, while ...

get selection as alias list

returns a list of aliases. I prefer to always use the second.

And something that was fixed either in Snow Leopard or in Leopard is that even if there is only one item selected, it returns a list of one item.  In the past, it erred, and you would have to use

get selection as alias

That meant that you had to check the count of items in the selection and branch to appropriate code.

BTW, now it even returns and empty list if nothing is selected (even if "as alias list" is used); previously, it would err with no selection.

I've noticed that, too. I used to have to write something like this ...

try
set folderList to (sort (folders of folderRef) as alias list by name) -- alpha-numeric order, matches Finder
on error
set folderList to {(some folder of folderRef) as alias}
end try

Now, I can write just ...

set folderList to (sort (folders of folderRef) as alias list by name) -- alpha-numeric order, matches Finder

A bug has been fixed!

 _______________________________________________
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

References: 
 >faulty logic, mine (From: Tin Tin <email@hidden>)
 >Re: faulty logic, mine (From: Luther Fuller <email@hidden>)
 >Re: faulty logic, mine (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: How to get info about other machines on local network
  • Next by Date: Re: Quark 7 - Get picture box number
  • Previous by thread: Re: faulty logic, mine
  • Next by thread: Opening a Preference Pane by ID in a Localization-safe and 10.4-compatible Way
  • Index(es):
    • Date
    • Thread