Re: problem w/ text item delimiters
Re: problem w/ text item delimiters
- Subject: Re: problem w/ text item delimiters
- From: Malcolm Fitzgerald <email@hidden>
- Date: Thu, 8 Feb 2007 09:22:45 +1100
On 08/02/2007, at 1:01 AM, kai wrote:
the issue in this particular case is caused by a failure to coerce a
list of references to text. (The behaviour has long been thus and
certainly predates Mac OS X.) However, there should be no need to
perform individual coercions/evaluation, since dereferencing can
normally be carried out on the entire list:
--------------
set l to {"a", "b", "c"}
repeat with i in {"x", "y", "z"}
set l's end to i
end repeat
{l as string, l's contents as string}
-->{"abc", "abcxyz"} (* assuming tid value is {""} *)
I was amazed by this until I realised what was happening. The text
explains the problem but the example does not reveal the underlying
reason for the coercion failure. For anyone else who, like me, read too
quickly, we need to remember the values of l prior to coercion.
{l, l's contents}
-->{{"a", "b", "c", item 1 of {"x", "y", "z"}, item 2 of {"x", "y",
"z"}, item 3 of {"x", "y", "z"}}, {"a", "b", "c", "x", "y", "z"}}
{l as string, l's contents as string}
-->{"abc", "abcxyz"} (* assuming tid value is {""} *)
malcolm
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden