I have a few more questions or maybe remarks about the wx project wizard (focusing on the wxSmith track) :
When I have the wizard create me a wxSmith project (dialog based) I have in the
blablaMain.cpp, the following includes :
//(*InternalHeaders(blablaDialog)
#include <wx/bitmap.h>
#include <wx/font.h> //wxFont
#include <wx/fontenum.h>
#include <wx/fontmap.h>
#include <wx/image.h>
#include <wx/intl.h> // _()
#include <wx/settings.h> // wxSystemSettings, wxSystemSettings
#include <wx/string.h> // wxString
//*)
I *think* that the following are NOT needed :
1) wx/bitmap.h
2) wx.fontenum.h
3) wx/fontmap.h
4) wx/image.h
Is this correct ?
A remark about readability : several methods their arguments are all concatenated without any whitespace in between, which makes it hard to read. Is it possible to insert a space (no tab ;-) ) ?
Turn :
Create(parent,id,_("wxWidgets app"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE,_T("wxDialog"));
into :
Create(parent, id, _("wxWidgets app"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxDialog"));
well I should restate it : I looked at my project file (cbp) :
<Unit filename="UtcTranslatorApp.cpp" />
<Unit filename="UtcTranslatorApp.h" />
<Unit filename="UtcTranslatorMain.cpp" />
<Unit filename="UtcTranslatorMain.h" />
<Unit filename="wxsmith/UtcTranslatordialog.wxs" />
So it seems it is added to the project. Seems more a bug of CB then, that a build time it refuses to save it !!!
Quite easy to do but time-consuming. I just wonder why someone would like to read wxSmith's generated code Wink Since it's automatically generated, people may thread it as some black-box (even though it's content is available) which just do what it should. Currently I don't have enough time to switch. So this is probably also post-release task.
If you can pinpoint me the code, I am happy to help ;-)
Search for OnBuildCreatingCode functions in classes inside wxSmith/wxwidgets/defitems directory. Each of these functions is responsible for generating code and usually it's done through Codef function. This function works simillar to printf but is dedicated to code generation. So when you have f. ex. :
Code << Codef(Language,_T("%C(%W,%I,%P,%S,%T,%N);\n"));
Just change it to:
Code << Codef(Language,_T("%C(%W, %I, %P, %S, %T, %N);\n"));
That's all :)
(Note that some funcitons may use easier version of Codef - without streaming operator and Language argument, but it works the same).
Regards
BYO