Re: String to multiple-item list coercion
Re: String to multiple-item list coercion
- Subject: Re: String to multiple-item list coercion
- From: Malcolm Fitzgerald <email@hidden>
- Date: Sat, 28 Sep 2002 12:46:46 +1000
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>>.
Can we now decide what the shortest/simplest/handiest one liner is?
I'll offer the obvious:
(the clipboard as record)'s text
--
--
Malcolm Fitzgerald email@hidden
Database Manager
http://www.asauthors.org
The Australian Society of Authors ph: 02 93180877 fax: 02 93180530
_______________________________________________
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.