Re: Convert first char to lower case
Re: Convert first char to lower case
- Subject: Re: Convert first char to lower case
- From: Arthur J Knapp <email@hidden>
- Date: Wed, 09 Jan 2002 10:20:51 -0500
>
Subject: Re: Convert first char to lower case
>
Date: Wed, 9 Jan 2002 12:55:34 +0000
>
From: Nigel Garvey <email@hidden>
>
has wrote on Wed, 9 Jan 2002 00:24:19 +0000:
>
> Nigel Garvey wrote:
>
>> The tests also show that if you run the test script too many times,
>
>> Script Editor crashes.
>
> OK, so what I've worked out is that there is a problem with lines like the
>
> following:
>
>
>
>> set AppleScript's text item delimiters to {character 1 of Variable1}
>
> Try this and see if it makes a difference:
>
>
>
> character 1 of Variable1
>
> set AppleScript's text item delimiters to result
>
Ah yes. That does seem to make it more stable. It looks like another
>
manifestation of the ol' "reference in a list in a line of the script"
>
problem. The tids were getting set to {character 1 of Variable1} rather
>
than to {"T"}. The reference inside the list has to be resolved first by
>
creating the list with a separate instruction.
I've had tremendous success with using "item X of STRING" over
"character X of STRING". This syntax also seems to be slightly
faster in exhustive speed tests.
(Perhaps when Unicode is more properly integrated into AppleScript,
"item" and "character" will no longer be interchangeable???)
>
Maybe not so much a bug as a surprise.
You've described AppleScript itself... ;-)
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://homepage.mac.com/ewalet/DeskTop.html>
on error number -128
end try
}