• 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: Class ksty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class ksty


  • Subject: Re: Class ksty
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 5 Aug 2008 12:57:13 -0700

On Aug 2, 2008, at 10:44 AM, Laine Lee wrote:

I know I'm slow getting around to this, but in Tiger

"some text" as Unicode text as string as record
--> {«class ktxt»:"some text", «class ksty»:«data  
styl0001000000000010000E00030000000C000000000000»}

Now in Leopard

"some text" as Unicode text as string as record
--> {«class ktxt»:"some text"}

I have a script or two that I'm rather fond of that uses «class ksty».
Is there any way to get it? Why shouldn’t I want it? Or maybe I
should be asking what documentation explains this change
and how I might work around it. Thanks.

This has to do with Leopard AppleScript's shift to pure Unicode: text objects are all unstyled Unicode text -- in old-school terms, the same thing as "Unicode text".  We made the "as record" bit work at least a little bit because of the trick people used to create "plain" text for certain defective applications:

«class ktxt» of ("some text" as string as record)

This is a no-op under Leopard -- you still get Unicode text out the other end -- but it doesn't fail.  The old "styled text" type (and the 'ksty' data is part of that) has been deprecated simply because it doesn't work very well these days -- there are large swaths of characters that it simply can't represent.  Honestly, I have difficulty imagining what you'd do with the 'ksty' part of the record in the first place.

The various new features of Leopard AppleScript are documented in <http://developer.apple.com/releasenotes/AppleScript/RN-AppleScript/index.html>.  There isn't a transition guide as such, but there are some notes about how to write scripts that are forward- and backward-compatible.


--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

  • Follow-Ups:
    • Re: Class ksty
      • From: Laine Lee <email@hidden>
    • Re: Class ksty
      • From: Luther Fuller <email@hidden>
References: 
 >Class ksty (From: Laine Lee <email@hidden>)

  • Prev by Date: Installer.app can't 'display dialog'
  • Next by Date: Re: Class ksty
  • Previous by thread: Class ksty
  • Next by thread: Re: Class ksty
  • Index(es):
    • Date
    • Thread