• 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: Coercing Styled Text to Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coercing Styled Text to Text


  • Subject: Re: Coercing Styled Text to Text
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 14 Jun 2001 23:44:58 -0700

On Thursday, June 14, 2001, at 01:55 AM, Ehsan Saffari wrote:

on error message
set message to <<class ktxt>> of (message as record)

or a slightly differnt variation

set plainTxt to item 1 of (((stylTextObj) as record) as list)

This variation is an extremely bad idea. Record items are not guaranteed to be in any particular order and are subject to change. If you rely on their position, your script may break in the future, whereas the original that uses the key will be fine. (And before you say "that'll never happen," it just did to someone using "info for" in this way!)


--Chris Nebel
AppleScript Engineering


  • Prev by Date: Applescript /AOL/ Webpages
  • Next by Date: Eliminating items from a MS Word list
  • Previous by thread: Coercing Styled Text to Text
  • Next by thread: Re: Coercing Styled Text to Text
  • Index(es):
    • Date
    • Thread