Re: When does "item x of" auto-iterate?
Re: When does "item x of" auto-iterate?
- Subject: Re: When does "item x of" auto-iterate?
- From: Christopher Nebel <email@hidden>
- Date: Tue, 18 Mar 2008 09:59:00 -0700
On Mar 17, 2008, at 10:19 AM, Thomas Summerall wrote:
set myList to { {"a","b"}, {'"c","d"} }
item 1 of my List
returns {"a","b"} as expected
tell application "Finder"
set myDisks to disks
set firstDisk to item 1 of myDisks
end tell
returns the first volume, as expected.
tell application "Finder"
set myItems to item 1 of disks
end tell
returns a list containing item 1 of each volume. Kind of neat, but
why? Bug or feature?
It's a feature, and it works when the right-hand side of the "of" is a
range specifier of some sort (such as "disks", which is equivalent to
"every disk"), as opposed to a list object as in the first case. Bear
in mind that a specifier is *not* the same thing as its value.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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