User forums > Using Code::Blocks

C::B crash (Settings-->Editor)

<< < (15/16) > >>

Zlika:
Thank you very much for your help.
I have commited the "wxTextCtrl's changes", but not the CSLanguageDef because killerbot changed its LanguageDef to SLanguageDef, so it should be ok now on this point.

But someone have made a change because when compiling I have:
codestat.cpp: In member function `virtual cbConfigurationPanel* CodeStat::GetConfigurationPanel(wxWindow*)':
codestat.cpp:80: error: cannot allocate an object of type `CodeStatConfigDlg'
codestat.cpp:80: error:   because the following virtual functions are abstract:
sdk/configurationpanel.h:19: error:  virtual wxString cbConfigurationPanel::GetTitle()
sdk/configurationpanel.h:21: error:  virtual wxString cbConfigurationPanel::GetBitmapBaseName()

Doctor C++, could you cure this too? :-)

Michael:

--- Quote from: Zlika on April 21, 2006, 10:14:48 pm ---I have commited the "wxTextCtrl's changes", but not the CSLanguageDef because killerbot changed its LanguageDef to SLanguageDef, so it should be ok now on this point.

--- End quote ---

Thank you very much :).

Yes, I think so too. The CSLanguageDef should be not necessary now.

Best wishes,
Michael

Pecan:

--- Quote from: Zlika on April 21, 2006, 10:14:48 pm ---But someone have made a change because when compiling I have:
codestat.cpp: In member function `virtual cbConfigurationPanel* CodeStat::GetConfigurationPanel(wxWindow*)':
codestat.cpp:80: error: cannot allocate an object of type `CodeStatConfigDlg'
codestat.cpp:80: error:   because the following virtual functions are abstract:
sdk/configurationpanel.h:19: error:  virtual wxString cbConfigurationPanel::GetTitle()
sdk/configurationpanel.h:21: error:  virtual wxString cbConfigurationPanel::GetBitmapBaseName()

Doctor C++, could you cure this too? :-)

--- End quote ---

Yes.. I had that problem too. It seems the plugin interface
changed recently.

But if you'll just use the .zip I uploaded with the latest SVN,
(changing the CSLanguage back to Language), I think it'll
work fine with the latest SVN.

thanks
pecan


EDIT: the .zip I uploaded compiles fine with SVN 2366 on
both windows XP and Ubuntu 510

Someone added some const's to the declaration headers, making
the current definitions incompatible. But if you'll modify
the current (from SVN 2366) versions, all will compile.
 

killerbot:
yes, some methods became const, but all plug-ins in svn have been updated.
So apply your changes on the latest in svn and all should be fine.

Der Meister:
Anyway, I still had the problem that the textcontrols in the config-dialog were empty. I found out that the problem was the function that was used to set the value for the textcontrol. The function that was used was SetLabel. But this function is not even mentioned as member of wxTextCtrl. I don't know from which parent-class this member-function was inherited (I would gess wxWindow) but it was probably not intended to set the value for the textcontrol. After changing SetLabel to SetValue (that is the correct function, according to the documentation of wxTextCtrl) everything works fine. The values are displayed and the codestats plugin doesn't complain about an empty project any more.
Here is the patch for this:

--- Code: ---Index: src/plugins/contrib/codestat/codestatconfig.cpp
===================================================================
--- src/plugins/contrib/codestat/codestatconfig.cpp     (revision 2448)
+++ src/plugins/contrib/codestat/codestatconfig.cpp     (working copy)
@@ -50,13 +50,13 @@
 {
     // Clear text fields and combobox
     wxTextCtrl* txt_FileTypes = XRCCTRL(*this, "txt_FileTypes", wxTextCtrl);
-    txt_FileTypes->SetLabel(_T(""));
+    txt_FileTypes->SetValue(_T(""));
     wxTextCtrl* txt_SingleComment = XRCCTRL(*this, "txt_SingleComment", wxTextCtrl);
-    txt_SingleComment->SetLabel(_T(""));
+    txt_SingleComment->SetValue(_T(""));
     wxTextCtrl* txt_MultiLineCommentBegin = XRCCTRL(*this, "txt_MultiLineCommentBegin", wxTextCtrl);
-    txt_MultiLineCommentBegin->SetLabel(_T(""));
+    txt_MultiLineCommentBegin->SetValue(_T(""));
     wxTextCtrl* txt_MultiLineCommentEnd = XRCCTRL(*this, "txt_MultiLineCommentEnd", wxTextCtrl);
-    txt_MultiLineCommentEnd->SetLabel(_T(""));
+    txt_MultiLineCommentEnd->SetValue(_T(""));
     wxComboBox* combo_Names = XRCCTRL(*this, "combo_Names", wxComboBox);
     combo_Names->Clear();
 
@@ -150,13 +150,13 @@
        {
           ext_string = ext_string + _T(" ") + languages[id].ext[i];
        }
-       txt_FileTypes->SetLabel(ext_string);
+       txt_FileTypes->SetValue(ext_string);
        wxTextCtrl* txt_SingleComment = XRCCTRL(*this, "txt_SingleComment", wxTextCtrl);
-       txt_SingleComment->SetLabel(languages[id].single_line_comment);
+       txt_SingleComment->SetValue(languages[id].single_line_comment);
        wxTextCtrl* txt_MultiLineCommentBegin = XRCCTRL(*this, "txt_MultiLineCommentBegin", wxTextCtrl);
-       txt_MultiLineCommentBegin->SetLabel(languages[id].multiple_line_comment[0]);
+       txt_MultiLineCommentBegin->SetValue(languages[id].multiple_line_comment[0]);
        wxTextCtrl* txt_MultiLineCommentEnd = XRCCTRL(*this, "txt_MultiLineCommentEnd", wxTextCtrl);
-       txt_MultiLineCommentEnd->SetLabel(languages[id].multiple_line_comment[1]);
+       txt_MultiLineCommentEnd->SetValue(languages[id].multiple_line_comment[1]);
 }
 
 /** Add configuration for a new language.

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version