Re: path to as string
Re: path to as string
- Subject: Re: path to as string
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 25 Jun 2005 13:42:03 -0700
- Thread-topic: path to as string
On 6/25/05 1:27 PM, "Matt Neuburg" <email@hidden> wrote:
> Consider:
>
> path to desktop as string
That one is using the 'as' parameter of 'path to' command - it's not a
coercion. It's evidently been implemented to return plain-text type of
string (rare in this day and age).
> (path to desktop) as string
That one's a coercion, as you say. Nowadays that always returns
'international text', I think (which has some overlap, not sure exactly
what, with 'styled text', as far as I know.)
>
> The results look the same, usually, but they are not. If you examine the
> AEDesc that's coming back as a result, the first is a string, the second is
> styled text. (There is no point asking for the "class of result"; you are
> told "string" in both cases.) I recognize that the two are different
> operations (the first has the osax do the coercion, the second has AS do the
> coercion), but the use of styled text is odd. I am told that this is a way
> of dealing with the possibility of having to handle an encoding. But since
> we are advised that styled text can't handle every situation, I wonder
> whether this is wise behavior. I have to admit I find this situation
> confusing. m.
In some recent release notes, we're told that typeText, which I gather is
plain text, is being deprecated, whereas styled text and international text
are not being deprecated, just not "recommended". (Unicode text is
recommended.) So that might be the practical reason. Quite what the deeper
reason is for the reason (why plain text is being deprecated) I'm not sure,
although I can take a few wild guesses. Styled text still has useful
information on styles. International text I would hope could be deprecated
in favor of unicode text before too long.
--
Paul Berkowitz
_______________________________________________
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