Code::Blocks won’t edit wxSmith file, sloved
While I’m using Code::Blocks, it crashed suddenly and when I reopen the project, one of the newest panel created by wxSmith won’t open in Resources mode, instead, it opened as text file. Thus I can’t change the GUI in wxSmith. Here’s steps to fix the issue.
1. Add the .h, .cpp and .wxs into the project if it’s not there
2. Close project
3. Open cbp file in a text editor, btw I like PSPad and Notepad++ the most on Windows and Geany on Linux
4. Find the section in the cbp file:
<wxsmith version=”1″>
<gui name=”wxWidgets” src=”wxTailApp.cpp” main=”wxTailFrame” init_handlers=”necessary” language=”CPP” />
<resources>
<wxFrame wxs=”wxsmith/wxTailframe.wxs” src=”wxTailMain.cpp” hdr=”wxTailMain.h” name=”wxTailFrame” language=”CPP” />
</resources>
</wxsmith>
5 Add this line into resources:
<wxPanel wxs=”wxsmith/NewPanel.wxs” src=”NewPanel.cpp” hdr=”NewPanel.h” name=”NewPanel” language=”CPP” />
rename the NewPanel.wxs, NewPanel.cpp, NewPanel.h, NewPanel accordingly.
6. Save the file, reopen the project, it’s solved!










