Automatic capitalization of variable names, type names, subs and functions 
Author Message
 Automatic capitalization of variable names, type names, subs and functions

Automatic capitalization has been problematic for my team, which
shares projects through SourceSafe.  Often, opening a project and
changing a single line in a .cls file causes changes to capitalization
throughout the file.  THis makes it very hard to find the signficant
changes using SourceSafe's file differencing tools.  Anyone else have
this problem?  Any solutions?

Thanks,
Hugh {*filter*}



Tue, 17 Aug 2004 01:16:31 GMT  
 Automatic capitalization of variable names, type names, subs and functions
You do have OPTION EXPLICIT in every single source module, don't you? It is
NOT the default in VB. Lack of OPTION EXPLICIT can cause this.


Quote:
> Automatic capitalization has been problematic for my team, which
> shares projects through SourceSafe.  Often, opening a project and
> changing a single line in a .cls file causes changes to capitalization
> throughout the file.  THis makes it very hard to find the signficant
> changes using SourceSafe's file differencing tools.  Anyone else have
> this problem?  Any solutions?

> Thanks,
> Hugh {*filter*}



Tue, 17 Aug 2004 01:22:44 GMT  
 Automatic capitalization of variable names, type names, subs and functions
Hugh:

Quote:
> Automatic capitalization has been problematic for my team, which
> shares projects through SourceSafe.  Often, opening a project and
> changing a single line in a .cls file causes changes to capitalization
> throughout the file.  THis makes it very hard to find the signficant
> changes using SourceSafe's file differencing tools.  Anyone else have
> this problem?  Any solutions?

We too use SS for our source-control and have the same problem -- if
someone defines a local variable with different capitalization than a
Method/Property/etc. in a referenced Class, the reference is given the
case of the local variable.

Eric's suggestion about Option Explicit has no bearing on this -- all
our files have Option Explicit. The only solution we found was
self-discipline in naming our variables -- they should maintain the Case
of existing Methods/Properties/etc.

At check-in time, if the Diff shows that there differences in Case, the
check-in is Cancelled, the differences corrected and the file checked-in
again.

--
// Lee



Tue, 17 Aug 2004 02:00:34 GMT  
 Automatic capitalization of variable names, type names, subs and functions
When you check for difference you can check box "Ignore case"
It is fine with VB


Quote:
> Automatic capitalization has been problematic for my team, which
> shares projects through SourceSafe.  Often, opening a project and
> changing a single line in a .cls file causes changes to capitalization
> throughout the file.  THis makes it very hard to find the signficant
> changes using SourceSafe's file differencing tools.  Anyone else have
> this problem?  Any solutions?

> Thanks,
> Hugh {*filter*}



Tue, 17 Aug 2004 02:34:56 GMT  
 Automatic capitalization of variable names, type names, subs and functions

Quote:

> Automatic capitalization has been problematic for my team, which
> shares projects through SourceSafe.  Often, opening a project and
> changing a single line in a .cls file causes changes to capitalization
> throughout the file.  THis makes it very hard to find the signficant
> changes using SourceSafe's file differencing tools.  Anyone else have
> this problem?  Any solutions?

Bleah...  Can SourceSlay be told to do case-sensitive comparisons on
some files but do "binary" comparisons on others?  Then segregate all
embedded strings out into files tagged for case-sensitive comparisons,
since you'd want to catch "Save changes?" turning into "sAVE cHANGES?"

Of course, auto-craps isn't a whole hell of a lot better now than it
was back in VB3.  Didn't the auto-craps guy talk to the Shift-F2 guy?

--
Joe Foster <mailto:jlfoster%40znet.com>  Sign the Check! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Tue, 17 Aug 2004 02:34:58 GMT  
 Automatic capitalization of variable names, type names, subs and functions

Quote:
> You do have OPTION EXPLICIT in every single source module, don't you? It is
> NOT the default in VB. Lack of OPTION EXPLICIT can cause this.

It *IS* the default for VB5 Pro...


Tue, 17 Aug 2004 05:16:11 GMT  
 Automatic capitalization of variable names, type names, subs and functions

released on 28 Feb 2002 09:16:31 -0800 bearing the following
fruit:

Quote:
>Automatic capitalization has been problematic for my team, which
>shares projects through SourceSafe.  Often, opening a project and
>changing a single line in a .cls file causes changes to capitalization
>throughout the file.  THis makes it very hard to find the signficant
>changes using SourceSafe's file differencing tools.  Anyone else have
>this problem?  Any solutions?

This can be a useful feature if used correctly, we make it a
standard that all variables have a capital letter eg
Dim strName as string

J



Fri, 20 Aug 2004 17:26:20 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Sub names - capitalization?

2. Returning sub or function name within a specific sub or function

3. Retrieve name of current sub/function and name of current module

4. Calling a function/sub when a variable holds the name

5. The value of a variable (String type) is the name of a variable

6. Calling a sub or function using a variable through another sub or function

7. Calling a sub name held in a variable

8. Simple Question - Variable's as Sub names

9. Capitalization of Names from a Text Box Entry

10. Obtaining Current Sub/Function Name

11. How to get function/sub procedure name

12. Function/Sub Name

 

 
Powered by phpBB® Forum Software