• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: String to multiple-item list coercion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: String to multiple-item list coercion
      • From: Malcolm Fitzgerald <email@hidden>
References: 
 >Re: String to multiple-item list coercion (From: Paul Skinner <email@hidden>)

  • Prev by Date: Close window
  • Next by Date: Re: Sending Control-T to Terminal
  • Previous by thread: Re: String to multiple-item list coercion
  • Next by thread: Re: String to multiple-item list coercion
  • Index(es):
    • Date
    • Thread