Re: path to as string
Re: path to as string
- Subject: Re: path to as string
- From: has <email@hidden>
- Date: Wed, 29 Jun 2005 00:32:57 +0100
jj wrote:
> >> You can ask for the same text 'as
> >> record', and then typeStyledText and typeIntlText will return style
> >> information ´class kstyª as well as its plain text ´class ktxtª.
> >
> > Note: that's a bug, not a feature.
>
>Why do you say this is a bug?
Because that's what it is. (It's undocumented behaviour and I'm pretty sure it's been confirmed as a bug in the past.) The string-to-record coercion is causing internal implementation details to leak out, instead of raising an error -1700 as you'd expect. Like the well-known 'path to me' bug it might be useful breakage, but it's breakage nevertheless.
>For instance, in Tiger you can copy a file name in the
>clipboard, and the Finder will place lots of info in separate arrays:
>UTF-16, styled text, etc.
Clipboard behaviour's a different issue.
>I think International text had a similar idea and behaviour. Depending on
>its language and script code, the target application should choose different
>font faces to display the related text (if needed). Otherwise, if you were
>TextEdit, why would you choose Arial instead of a Chinese-based font, at
>paste-time? So, "ksty" is here useful info, I think...
No doubt. The point is merely that this data isn't meant to be directly visible within AppleScript.
Anyway, it's not that important. As Mr Nebel says, folks should be avoiding AppleScript's 'string' type (except when it's required by, say, older apps and osaxen) and use the 'Unicode text' type instead.
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
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