Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: szurilo on February 05, 2008, 10:13:45 am
-
Hi!
I have a strange problem with CB 4821 unicode, with wxWidegts 2.8.7 under Debian.
Sometimes my variable declarations and header includes disappear or doubled in the source of my application.
I cant tell when, but after closing or saving the project it used to happens.
For example, i declare in the main header file:
wxBoxSizer* BoxSizer4;
Its ok for a while but once, suddenly CB put this row inside the constructor of my main wxDialog window.
Or i declare this:
wxChoice** Chn_Choice0;
and this:
#include <wx/choice.h>
and after some running the include disappear and i get errors.
Why is that? Thx.
Szurilo
-
Hi !
Did you put your code in a part that is managed by a graphical interface designer (wxSmith, wxGlade) ?
Dje
-
Well i think you mean this part:
//(*Headers(SRC_SRM_apiDialog)
#include <wx/sizer.h>
#include <wx/stattext.h>
//*)
My answer is no. I always put my code other places to separate what i and what the compiler/linker do.
Anyway where can i read about these automatic things that wxSmith doing?
Szurilo
-
I noticed, declarations appear in the constructor of the main wxDialog window if i save my wxSmith *.wxs file.
This, of course, leads to errors, in this case a segmentation fault.
Szurilo
-
For example, i declare in the main header file:
wxBoxSizer* BoxSizer4;
I noticed, declarations appear in the constructor of the main wxDialog window if i save my wxSmith *.wxs file.
If you use wxSmith you must not declare the objects in wxSmith yourself, wxSmith will do it for you.
If you specify the object as a member (in the properties window of wxSmith) it will be declared in the headerfile of your main window, otherwise in the constructor of the main window.
When you edit or save the wxs file wxSmith will update the associated header and implementation files.