Re: Filters with "entire contents of"
Re: Filters with "entire contents of"
- Subject: Re: Filters with "entire contents of"
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 16 Oct 2004 14:00:54 -0700
On 10/16/04 1:22 PM, "Michelle Steiner" <email@hidden> wrote:
>
> On Oct 16, 2004, at 1:16 PM, Martin Orpen wrote:
>
>>> Why don't the first three variations work? (using Script Editor 2.0,
>>> AS 1.9.3, Panther 10.3.5)
>>
>> Can a list have a label index?
>
> But "every item of" is also a list.
>
> Besides, that's how "whose" works.
'whose' clauses do not work with AppleScript lists (the longest standing
AppleScript feature request). In applications, developers implement whose
filters to work on the specified application objects, and the result is a
list. I believe that Chris Nebel once said that developers _could_ choose to
implement them on previously-evaluated lists (I may have that wrong), but
I've never run into one. The example you gave that works:
(every item of entire contents of f) whose label index is not 0
is probably not what you think it is. 'item' is not AppleScript's keyword
for a list member. Since it's in a Finder tell block, the Finder's 'item'
object takes precedence. So this is really
every item of (entire contents of f) whose label index is not 0
This may be what Chris was talking about (if he did). The construction is
similar to the usual
every [element] of [an application object] whose [some property] = [some
value]
unlike all your other examples, but the application object (entire contents
of f) resolves to a list. Here, it's probably implemented as a reference
that stays "live" long enough to have a whose clause act on it. Interesting.
--
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