Re: choose from list bug??
Re: choose from list bug??
- Subject: Re: choose from list bug??
- From: Christopher Nebel <email@hidden>
- Date: Thu, 29 Mar 2007 13:45:42 -0700
On Mar 28, 2007, at 5:11 PM, David Marshall wrote:
On Tue, 27 Mar 2007 12:15:06 -0700, "Stockly, Ed" wrote:
Off the top of my head I can only think of a one case where a
value can be
coerced by placing the class first:
date "3/27/2007"
But that form doesn't work with most other classes
I don't understand this. How else do we navigate the file system
but by this kind of coercion?
Notice he said "most", not "all", and that's not a coercion, it's an
object specifier. Object specifiers are *not* the same thing as
coercion, and use completely different code paths, so the fact that
"x as thing" is defined doesn't (necessarily) have any bearing on how
"thing x" is defined, and vice versa.
Most of the built-in types in AppleScript -- integer, boolean, list,
etc. -- support coercion, but not object specifiers. A few, such as
"date", support specifiers and not coercion, and a few others, such
as "alias", are symmetric. Objects belonging to applications, such
as Finder's "folder" class, generally support specifiers, but not
coercion.
The fact that the two operations are not more symmetric is arguably a
bug (or at least a design flaw), and there's one filed to that
effect, but until such time as it's fixed, there you have it.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden