Re: Dialog from script application displays raw codes
Re: Dialog from script application displays raw codes
- Subject: Re: Dialog from script application displays raw codes
- From: Christopher Nebel <email@hidden>
- Date: Wed, 30 Aug 2006 12:47:53 -0700
On Aug 29, 2006, at 4:00 PM, has wrote:
we need a way of forcing the compiler to decompile raw codes like
«class cfol» and «class docf» into their more readily recognised
terms: "folder" or "document file"
is incorrect, because the compiler is not involved in runtime
conversions of AE codes to their human-readable equivalents. It's
the interpreter that's coercing your type classes to strings. What
your 'run script' trick does is ensure that the Finder's terminology
will be available for the interpreter to use when it performs that
coercion.
Mind you, if AS were smarter, it'd store the pre-parsed keyword-code
translations for application-defined class and constant names within
the compiled script. That way the interpreter would always have
access to that information when coercing type classes and constants
to strings. Probably a bit late to file a feature request now
though. :)
In fact, the whole identifier-to-string coercion feature was a not-
very-well-thought-out hack that was created mainly so people could
coerce weekday identifiers to strings. In some sense, any such
operation is a bad idea, because it's inherently English-only. Of
course, a lot of AppleScript users don't care, since they speak
English real good and don't plan to give their script to anyone who
doesn't.
--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:
This email sent to email@hidden