• 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: Filters with "entire contents of"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filters with "entire contents of"


  • Subject: Re: Filters with "entire contents of"
  • From: Paul Berkowitz <email@hidden>
  • Date: Sat, 16 Oct 2004 14:45:28 -0700

On 10/16/04 2:07 PM, "Michelle Steiner" <email@hidden> wrote:

>> 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.
>
> But this still doesn't answer the question of why it works with "every
> item of" but doesn't work if that is omitted.
>
> set f to choose folder
> tell application "Finder"
> (entire contents of f) = (every item of entire contents of f)
> end tell
>
> --> true
>
> If they are identical why does the whose clause work with one and not
> the other?

They are not identical. They simply evaluate to the same result.

 'every item of', like ALL whose clauses, is constructed as 'every [element]
of [some object]' - which engages the application at some level before any
list is formed. An implementer here will know the lower-level instruction it
uses. 'entire contents', on its own, is evaluated to a list,  which can't
support whose clauses. The unusual thing here is that 'every item of entire
contents' seems to be treating 'entire contents' as a reference and not as
an AppleScript list.

--
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

  • Follow-Ups:
    • Re: Filters with "entire contents of"
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Filters with "entire contents of" (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: [OT] Mac CAD software
  • Next by Date: Re: Filters with "entire contents of"
  • Previous by thread: Re: Filters with "entire contents of"
  • Next by thread: Re: Filters with "entire contents of"
  • Index(es):
    • Date
    • Thread