• 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: Question about "info for" command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about "info for" command


  • Subject: Re: Question about "info for" command
  • From: Chris Page <email@hidden>
  • Date: Thu, 14 Jun 2001 04:24:13 -0700

nigh on 2001.06.14 1:10 AM, Jan Pieter Kunst at email@hidden wrote:

> tell application "Finder"
> set x to folder of (info for selection)
> end tell
>
> --> returns an error message??

Just discovered this recently myself. Let me see if I can explain it
correctly:

"info for" is provided by the Standard Additions osax, not the Finder. It
returns a record with various properties of the item. One of the properties
is "folder". It is a boolean that indicates whether the item is a folder
(else it is a file).

The Finder also has the word "folder" in its terminology, only it is a
class, not a property.

When you use the word "folder" in the above tell block, it uses the one from
the Finder's terminology, and of course "folder of..." then is a syntax
error.

One workaround is to get the folder property outside the tell block, e.g.:

tell application "Finder" to set i to info for selection
set x to folder of i

--
Chris Page
Mac OS Lead, Palm Desktop
Palm, Inc.

One of the symptoms of an approaching nervous breakdown is the belief that
one's work is a giant talking wheel of cheese. - Bertell Russland


References: 
 >Question about "info for" command (From: Jan Pieter Kunst <email@hidden>)

  • Prev by Date: Re: Error geetting offset of char in errMsg
  • Next by Date: How to 'load' osaxen
  • Previous by thread: Re: Question about "info for" command
  • Next by thread: Re: Question about "info for" command
  • Index(es):
    • Date
    • Thread