• 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: Dialog from script application displays raw codes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Dialog from script application displays raw codes
      • From: "Steven D. Majewski" <email@hidden>
    • Re: Dialog from script application displays raw codes
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Dialog from script application displays raw codes (From: has <email@hidden>)

  • Prev by Date: Re: Apple Mail, copy rich text
  • Next by Date: Re: Dialog from script application displays raw codes
  • Previous by thread: Re: Dialog from script application displays raw codes
  • Next by thread: Re: Dialog from script application displays raw codes
  • Index(es):
    • Date
    • Thread