|
From: Malcolm N. <m.n...@wa...> - 2008-10-02 20:52:03
|
On 02/10/2008 21:55, so...@ti... wrote:
> I have posted a basic guide on the wiki with the contents of
> discussions so far.
What about component naming? Obviously the components have inherited
their Delphi names but should there be a list of components and their
"accepted" names? At the moment it is not important, but I envisage us
continuing development, perhaps adding new dialogs, and these should
follow the naming conventions for the rest of the project.
While we are on the subject, should this be something we should add to
wxdev-c++ initially? Offering a cbTemp1 instead of WxCheckBox1?
> To get more feedback on the guidelines I have a
> list of other projects guidelines. I particularly like some of the
> ideas of the NOX project.
>
I would insist on changing
Braces ("{}") which enclose a block should be aligned as follows:
if ( /*Something*/ ) // Yes!
{
i++;
j++;
}
if ( /*Something*/ ) { // Okay
i++;
j++;
}
if ( /*Something*/ ) // No!
{
i++;
j++;
}
to
Braces ("{}") which enclose a block should be aligned as follows:
if ( /*Something*/ ) // Yes!
{
i++;
j++;
}
if ( /*Something*/ ) { // No!
i++;
j++;
}
if ( /*Something*/ ) // No!
{
i++;
j++;
}
That is
if ( /*Something*/ ) // Yes!
{
i++;
j++;
}
should be the only acceptable form. Once we use Astyle then I think this is|--style=ansi
Further Astyle options
||--indent=tab=4 // indent using tabs, and each tab is 4 spaces|
|--brackets=break //should be covered in --style=ansi|produces the effect above
|--indent-classes
||--indent-switches
||--indent-namespaces
||--indent-labels
||--indent-preprocessor
||--max-instatement-indent=40
||--pad=paren
I'm not sure if I've missed anything important. We do need a config file
for our use, so we only need to call astyle on the file itself. I had
astyle as a tool in wxdev once, so it is certainly possible to use
within the ide.
Could I also suggest that developers keep two verions of the code on
their systems? One which is a local copy of the svn head, and the second
which is the actual work in progress copy. All changes should be
transferred from the working copy to the svnhead copy before updating
svn. This way we should be able to prevent updates to form files when
all that has changed is the position of a component (unless that
position/size change is warranted). We all know that to have the code
generated we need to change something, and the easiest is to move a
component, but that change doesn't have to be returned to svn.
Also (and unfortunately we don't seem to be able to do this currently)
we need to have the designer place dialogs in a subdirectory. So for
example the base directory should have all necessary files and the main
form files, but that each dialog thereafter should be placed in its own
folder. Thus each folder would contain three files (not yet decided
about the xrc files) the .cpp/.h/.wxform files. Unfortunately I don't
seem to be able to do this at the moment, but would like to see it
happening.
I'll probably think of something later, but these are my initial thoughts.
Best regards
Mal
|
|