Re: Jaguar, AS 1.9. Coercing alias to string still returns styled text
Re: Jaguar, AS 1.9. Coercing alias to string still returns styled text
- Subject: Re: Jaguar, AS 1.9. Coercing alias to string still returns styled text
- From: Christopher Nebel <email@hidden>
- Date: Sun, 25 Aug 2002 12:08:12 -0700
On Sunday, August 25, 2002, at 01:34 AM, Cornwall wrote:
alias "path:for:something" as string
Yields a string of styled text.
Yep. This isn't new; I think it's been this way since AppleScript 1.7.
The trick is that (a) path strings are now returned as Unicode text,
and (b) "as string" isn't clever enough to suppress the style
information if it's merely the system default style. (You could argue
that doing so would be wrong, however -- see below.)
Is the only way to get plain text still to use that weird "class
<<kext>>"
(or whatever) coercion? It really slows things down, and will probably
stop working someday to boot.
Only way I've heard of. That trick will probably keep working for
quite a while, since it's actually a side effect of the Apple Event
Manager.
You should be aware, however, that throwing away the style information
actually changes the effective contents of the string in some cases,
specifically for strings that contain characters that are not in your
primary language (e.g., Japanese, Greek, or some Czech accented letters
for an English user). The resulting plain text will display
incorrectly. Why exactly do you want the style information gone?
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.