Page 1 of 1

New C++ Class Window

Posted: Wed Dec 03, 2008 2:27 am
by zarnce
I noticed that the file name for a new C++ class is set to lower case even if you entered an uppercase class name. Is there a reason for this? Shouldn't it match what is entered for the class name?

Code: Select all

wxString NewClassDlg::GetClassFile()
{
    if(m_checkBoxEnterFileName->IsChecked()) {
        return m_textCtrlFileName->GetValue();
     } else {
        wxString fileName(m_textClassName->GetValue());
        fileName.MakeLower();
        return fileName;
    }
}
Thanks
Brian

Re: New C++ Class Window

Posted: Wed Dec 03, 2008 2:35 am
by eranif
zarnce wrote:I noticed that the file name for a new C++ class is set to lower case even if you entered an uppercase class name. Is there a reason for this? Shouldn't it match what is entered for the class name?
Well, I started my coding on Solaris/AIX/HP-UX (in short Unix world), where file names are usually set to lower case.

You can see that across codelite project, all files are using lowercase names, with (mostly) no underscore in betweem:

newclasswizard.cpp

This is how I use to code...

However, you can:
1) uncheck the box that sets the file name automatically, and type it the way you like it
2) send a patch that expands the current behavior (i.e. keeps the current behavior and adds new behavior(s))

Eran