• 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
Please explain this!? More....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Please explain this!? More....


  • Subject: Please explain this!? More....
  • From: Harald E Brandt <email@hidden>
  • Date: Fri, 23 Nov 2001 14:07:37 +0100

Quote from AppleScript Language Guide:
"The value of an Every Element reference is a list of the objects in the container."

Now try:
tell application "Finder" to class of (every file in control panels folder)
-- {application file, control panel, control panel, control, control, control, <and many more>}

The above violates AppleScript Language Guide!? It' not class list!
What are those braces?
The result of Every Element is thus not a list but a new, to me unknown, class. (Set of classes?)

Compare with:
tell application "Finder" to class of ((every file in control panels folder) as list)
-- list
Which is what I expected from the first statement. It can also be done with:
tell application "Finder" to class of (get every file in control panels folder)
-- list --(i.e that 'get' changed it all somehow!?)

I CAN do:
tell application "Finder" to name of ((folders whose name starts with "a") in extensions folder)
-- "ActiveX Controls"

I can also do:
tell application "Finder"
set name of ((folders whose name starts with "a") in extensions folder) to "NiceTry"
end tell

But I CANNOT do:
tell application "Finder"
set f to ((folders whose name starts with "a") in extensions folder)
set name of f to "NiceTry"
end tell
--Yields error!

???
With semantics like this, I can't program!!


______heb________________________________________________________________
Harald E Brandt email@hidden PGP/MIME aware http://heb.bragit.com


  • Follow-Ups:
    • Re: Please explain this!? More....
      • From: Paul Berkowitz <email@hidden>
    • Re: Please explain this!? More....
      • From: Hugh Dixon <email@hidden>
  • Prev by Date: Re: Please explain this!?
  • Next by Date: Re: Please explain this!?
  • Previous by thread: Re: Please explain this!?
  • Next by thread: Re: Please explain this!? More....
  • Index(es):
    • Date
    • Thread