Re: Question about "info for" command
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