Re: path to as string
Re: path to as string
- Subject: Re: path to as string
- From: Matt Neuburg <email@hidden>
- Date: Tue, 28 Jun 2005 10:15:11 -0700
On Mon, 27 Jun 2005 11:29:17 -0700, Christopher Nebel <email@hidden>
said:
>This is the subtle bit: the
>AppleScript "string" type, despite many people's fervent belief to
>the contrary, is *not* the same thing as typeText -- it's allowed to
>carry style information as well. Alias-to-string involves coercing
>the alias to a path, which is always represented as Unicode text for
>fidelity reasons, and then Unicode-text-to-string adds style
>information because that's how you represent encoding information in
>styled text, ergo, you get an AEDesc of typeStyledText.
You said several things there that looked like you thought (or wanted me to
think) they were totally normal and okay but which I actually found sort of
bizarre and stunning.
"string" and typeText are different? What can this mean? Does it mean that
"string" and "text" are different? No; whether I say
(path to desktop) as string
or
(path to desktop) as text
I still get a styled text as the result. Or maybe typeText and 'TEXT' are
different? But typeText is defined as 'TEXT', isn't it? And when I say
path to desktop as string
I can see that the rtyp is 'TEXT'. So in that sentence, "string" does mean
'TEXT'.
And then there's the part about using styled text to represent encoding
information, as if this were the most natural thing in the world. Style is
like bold, italic. Encoding is like - well, it's like encoding. They don't
seem at all similar to me. If a string can't be represented as pure text it
would seem most natural for it to come back as Unicode text - that's what
the Finder does when you ask for the name of a file, for instance. I feel
like I've walked into a hall of mirrors suddenly; I can't seem to get my
bearings. And assuming I was thinking of explaining this to someone else, I
really have no notion how I would do it. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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