Re: faulty logic, mine
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
|
_______________________________________________
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