Re: is this a bug?
Re: is this a bug?
- Subject: Re: is this a bug?
- From: Nigel Garvey <email@hidden>
- Date: Tue, 6 Aug 2002 10:48:11 +0100
has wrote on Tue, 6 Aug 2002 00:42:56 +0100:
>
Hi,
>
>
Compare the following under X.1.5:
>
>
set theString to "12345678"
>
theString's character 9
>
--> Error: Can't get character 9 of "12345678".
>
>
>
set theString to "12345678"
>
theString's character 9 is in "1234567890"
>
--> Error: Can't make character 9 of "12345678" into a string.
>
>
Anyone care to confirm the second case? Looks like a recent bug to me - I
>
certainly don't recall ever having this problem before - if so, is it a
>
known one? Should I give up trying to write clean, minimal code on the
>
assumption that AS actually knows what the heck it's doing, and strew
>
explicit 'get's all over the place? Hmph.
On my AS 1.6 machine, I get the first error in both cases.
By "clean, minimal code", do you mean not checking the length of
theString first? I usually find that looking before you leap is more
efficient than relying on an error block to bail you out. You may have
found another reason to adopt this approach.
NG
NG
_______________________________________________
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.