tags:

views:

88

answers:

0

I have a label control on a form named lblTotal

During my last commit to the repository I was surprised to see this form's name on the modified list.

When I looked through the code I saw that all occurrances of this control's name were now lbltotal, (ie Small t).

The control's name itself was lblTotal in the properties window.

Further when I used ctrl-F with case matching to find lbltotal it would only find one as instantly all other occurrances would revert to lblTotal. So it seems that at some moment after the IDE records some event in the code window it gets around to making the casing conform to the control's name.

What I don't understand is how this happened in the first place without a change to the control's name? Can someone explain how?

PS After I wrote the above I saw this. Interestingly I also had a string variable that's name had its casing changed during the same commit and I assumed I must have changed it myself but now, having read the above I think it's because the same variable name was present in a different scope. However there is no other occurrance of lbltotal anywhere else in the project.

PPS lblTotal is actually lblTotal(0) and many more copies are loaded during runtime, so a lot of the code references are lbltotal(x1).Caption etc. I don't know if this makes any difference.

Finally has anyone ever seen vb6 change the casing of string literals by itself? (Please God no!!) Actually this last point is what causes me the most unease about this experience as in TOO many places in the codebase string literals are used in conditional clauses.