Re: String to multiple-item list coercion
Re: String to multiple-item list coercion
- Subject: Re: String to multiple-item list coercion
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 27 Sep 2002 09:37:36 -0700
On 9/27/02 3:59 AM, "Paul Skinner" <email@hidden> wrote:
>
> set myPath to path to me as Unicode text
>
> set {text: myPath} to (text of myPath) as string
>
>
Actually it works in one fell swoop. The oddity is that the 'result'
>
of this statement is not the actual result. The functional result of
>
this is that myPath is now <plain text> but the 'result' returned by
>
the line is actually the 'result' of the '(text of myPath) as string'
Well, yes, but you can't omit the 'as string' or 'as text' part. As has
says, the result is actually what's to be expected. Another way of looking
at it is that '{text:myPath}', NOT 'myPath' itself is what you have to ask
for, and that's what you get. That's _precisely_ what I meant when I said
you had to do it in stages - I can't understand why you contradicted that.
The only way to get the "result" WE want (namely myPath as plain text) is to
insert an intermediary line, or a handler as you suggested, which first gets
a _record_ as a result. There's no way you can omit that intermediary step.
For me, the oddest part of all this is that in this one context, only, you
can get away with a normal English word , 'text', as the record label,
instead of having to use the raw code <<class ktxt>>.
--
Paul Berkowitz
_______________________________________________
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.