Re: Coercing Styled Text to Text
Re: Coercing Styled Text to Text
- Subject: Re: Coercing Styled Text to Text
- From: Ehsan Saffari <email@hidden>
- Date: Fri, 15 Jun 2001 00:47:50 -0600
On 15/06/2001 0:44, Christopher Nebel, email@hidden wrote:
>
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!)
Thanks Chris, I was hoping someone would confirm whether this actually
works on
OS 9, X...
cheers
ehsan