Re: TIDs case insensitive?
Re: TIDs case insensitive?
- Subject: Re: TIDs case insensitive?
- From: Chris Nebel <email@hidden>
- Date: Tue, 06 Mar 2001 16:00:23 -0800
- Organization: Apple Computer, Inc.
Bill Briggs wrote:
>
At 9:32 AM -0800 06/03/01, Chris Nebel wrote:
>
> > I just found to my great dispair that TIDs are case sensitive. Is
>
>there a way to make them insensitive? - no, not ignoring case, I
>
>just tried...
>
>> I use TIDs for fast substring replacements. If I cant' make them
>
>>case insensitive, I will have to use more traditional and less
>
>>efficient search/replace.
>
>
>
>Sorry, it's a known problem with no workaround in plain AppleScript.
>
>
Don't apologize. It can actually be useful. I wouldn't want that
>
fixed if it meant that an "A" was no longer just an "A", but could be
>
an "a" as well. IMHO it would be better that they stay strict
>
character designations. What Serge wants to do is a job for GREP.
>
>
>Most people don't notice because their delimiters are all punctuation.
>
>
But a script like this would break if it was case insensitive. ...
Allow me rephrase. I'd never make TIDs universally case-insensitive; I'd
make them respect considering/ignoring case. While I'd agree that
always-senstive is more useful than always-insensitive, I think that being
switchable is more useful than either.
However, you raise an interesting point: if I made this change, some
scripts would break, because they'd be relying on the case-sensitive
nature of TIDs even in the absence of a "considering case" block. (Your
script would work either way, because you put the relevant bits inside a
"considering case" block.) In the interests of consistency with the rest
of the language, I'm inclined to say "the heck with it" and make the
change anyway. Not any time soon, mind you, so don't panic yet, but you
might want to get in the habit of using "considering case" now if you
actually care.
>
Please don't make Text item delimiters case insensitive. I think
>
they are more useful the way they are. Something that *would* be
>
useful is to have multiple defined TIDs actually working.
Indeed. We've only been ignoring that bug since 1994...
--Chris Nebel
AppleScript Engineering