Re: Convert first char to lower case
Re: Convert first char to lower case
- Subject: Re: Convert first char to lower case
- From: Nigel Garvey <email@hidden>
- Date: Wed, 9 Jan 2002 12:55:34 +0000
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.
>
>
Oh goody, it's not just me noticed this problem then.
>
>
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}
>
>
Seems TIDs are very fussy about what they get set to, at least when you do
>
a lot of it.
>
>
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. has's suggestion uses an
implicit 'get' command. An explicit one also works:
set AppleScript's text item delimiters to (get {character 1 of
Variable1})
Maybe not so much a bug as a surprise.
NG