Re: alias is folder?
Re: alias is folder?
- Subject: Re: alias is folder?
- From: Christopher Nebel <email@hidden>
- Date: Sun, 27 Apr 2003 22:35:22 -0400
On Sunday, April 27, 2003, at 10:12 PM, matt neuburg wrote:
A more reliable approach is this:
tell application "Finder"
get class of item myAlias --> folder
end tell
Very nice, thank you. I'm not sure I understand why this works. I
guess what's happening is that we're coercing the alias to an item,
then asking for its lowest-level class (which is why we get folder,
not item).
Yes, except that "item myAlias" is an object specifier, not a coercion.
Those are two different operations in AppleScript. (You could argue
that they should be the same thing, and I have in the past.)
Is there a similar way to ask if myAlias is a container?
Unfortunately, no. That would require the ability to express the idea
of "is a kind of", which AppleScript hasn't got. (It should, mind you,
but it doesn't.) The best you can do is check for all the concrete
container types you know about and hope no new ones show up.
--Chris Nebel
Apple Development Tools
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.