Re: Questions about components naming convention

From: Joanna Carter \(TeamB\) (joannac_at_btinternetXX.com)
Date: 01/05/04


Date: Mon, 5 Jan 2004 15:13:02 -0000

Vince wrote:

| I'm writing a naming convention...
| 1) I use Hungarian notation rule for naming components, but I have a
| dilem: Should I use the same prefix for components which have the
| same role ? Example:
| TButton, TBitButton and TSpeedButton may use the same "btn" prefix or
| use a différent one ?

IMO, hungarian notation is not necessary as long as you give your variables
sensible names, but if you insist then btn, bbtn and sbtn come to mind.
Surely though, a button is a button, the type shouldn't have any impact on
the code that calls it, unless you want to know whether you can change the
bitmap or not?

| 2) How to norm constant ?
| For the moment, I use caps with underscore between embedded words.
| Example: MAX_SIZE;
| May be I should use a prefix for constant like "K_", cause it's
| easier to find constant in the ctrl+space list... ??

I use sName for resourcestrings and kName for consts (sometimes), otherwise
there is nothing wrong with your capitalized suggestion.

Joanna

--
Joanna Carter (TeamB)
Consultant Software Engineer
TeamBUG support for UK-BUG
TeamMM support for ModelMaker