Alexandre Leclerc wrote:
2006/6/1, Vincent Snijders <[EMAIL PROTECTED]>:
Why was OKButton renamed to btnOK and CancelButton to btnCancel?
Well, if this is not politically correct to rename controls, please
inform me so that I make all my efforts to not do it again; it is not
my intention to frustrate anyone.
I did it to make it clear I did scrap/reintroduce the controls; this
was not necessary I must say. This is a bad habit I have to name the
controls based on generally accepted standanrs: bntButton, pnlPanel,
lblLabel, etc. And when I read code to lear it's functionning, I often
also reformat (another very bad habit, especially because there are
softwares the can do this automatically, and also because it can most
potentially frustrate the original coder).
I've been influenced a lot by the following coding standards many
years ago: http://www.econos.de/delphi/cs.html (See Component
Prefixes; for the new one, I try to have a unique prefix.) The only
difference I apply sometimes (always now) is in the case statement
indentation. It is sometimes too much to indent the begin/end of a
case condition. so this is the only line I do no follow. Here is an
example I do:
procedure
case Condition of
condition1:
begin
Result := 1;
end;
condition2:
Result := 2;
end;
end;
Is there a coding standard in lazarus somewhere on the wiki? I can
follow these if there are any, no problems.
So if this indirectly not appreciated, please tell me so and hit my
fingers with a ruler; I will remember the lesson; hopefully.
Little has been written down:
http://wiki.lazarus.freepascal.org/index.php/DesignGuidelines
About this particular case, I think the wiki is not clear.
The wiki page names the "Borland Coding style guide lines". I don't know
if these are the same as the Object Pascal Style Guide:
http://community.borland.com/article/0,1410,10280,00.html
If so, paragraph 3.3, about Field naming says:
Delphi is created in California, so we discourage the use of notation, except
where required in header translations:
CORRECT
FMyString: string;
INCORRECT
lpstrMyString: string;
The exception to the Hungarian notation rule is in enumerated types.
If other developers agree, we should add this to the wiki page. If not,
then deviation from this standard should be mentioned.
Vincent
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives