MoI discussion forum
MoI discussion forum

Full Version: Script question

Show messages: All  1-11  12-14

From: fcwilt
27 Jul   [#12] In reply to [#11]
Hi Michael

Yes all is good.

The problem was my use of all lower case names instead of having the first letter a capital.

Perhaps a code fix is in order so the case of the names doesn't matter so the scripts in all cases work as intended.

Thanks.

Frederick
From: Michael Gibson
27 Jul   [#13] In reply to [#12]
Hi Frederick,

re:
> Perhaps a code fix is in order so the case of the names doesn't matter so the
> scripts in all cases work as intended.

That's something that would need to be fixed in the script.

Where your script is calling if ( a == b ) that's going to be a case sensitive comparison, that's how the Javascript == operator works with strings.

If you want it to be case insensitive you could do something like if ( a.toLowerCase() == b.toLowerCase() ) instead.

- Michael
From: fcwilt
28 Jul 0:26   [#14] In reply to [#13]
Hi Michael,

Understood about the behavior of ==.

But I was referring to this:

"while the parameter in the function call to reverseView() can tolerate different cases"

Why is it desirable that that function isn't case sensitive.

Not a big deal, just curious.

Frederick

Show messages: All  1-11  12-14