User forums > Using Code::Blocks
C::B crash (Settings-->Editor)
Michael:
--- Quote from: Pecan on April 21, 2006, 06:34:19 pm ---
--- Quote from: Michael on April 21, 2006, 03:59:50 pm ---There should be something that prevent the codestats to work. The project files are parsed, but then the warning message appears. This is strange. If the project is empty why parsing the files takes such a lot of time (e.g., C::B cbp)?
--- End quote ---
Actually, it is working. Only very wierdly.
Make sure to clear data between <codestat> and </codestat> out of the
default.conf (backup defautl.conf first please)
Start CB with codestat enabled.
Open a project.
Invoke Plugins/Code Statistics menu iitem.
Do *NOT* invoke Settings/Editor
(It scans and reports for me).
(You can do this many times)
Now, invoke Setting Editor/Code Stat Settings
Note that all but the "name" fields are blank
Click on OK
Now when you invoke Plugins/CodeStat it reports there is no project
because it has no fields to compare against except "blank". All its settings have been set to blank.
There is a logic err somewhere. Will look at that now...
--- End quote ---
Yes, I can confirm all what you have said. Doing Settings-->Editor makes the codestats plugin stopping to work (until you deleted the data between the codestat element).
Best wishes,
Michael
Pecan:
Success! Both in windows and in Linux. Whew...!
It seems that there are a lot of evils one can perform under
wxMSW that bites you in the @ss when performed under
wxGTK.
For example, under wxMSW you can allocate a wxStaticText
in code, but define it as a wxTextCtrl in XRC, then use SetLabel() on it when there is NO SetLabel() routine defined for wxTextCtrl.
This doesn't work under Linux.
And... this sort of thing will often cause a segfault when running under the
debug version of wxWidgets.
--- Code: ---void CodeStatConfigDlg::PrintLanguageInfo(int id)
{
selected_language = id;
wxStaticText* txt_FileTypes = XRCCTRL(*this, "txt_FileTypes", wxStaticText);
wxString ext_string = _T("");
for (unsigned int i=0; i<languages[id].ext.GetCount(); ++i)
{
ext_string = ext_string + _T(" ") + languages[id].ext[i];
}
txt_FileTypes->SetLabel(ext_string);
wxStaticText* txt_SingleComment = XRCCTRL(*this, "txt_SingleComment", wxStaticText);
txt_SingleComment->SetLabel(languages[id].single_line_comment);
wxStaticText* txt_MultiLineCommentBegin = XRCCTRL(*this, "txt_MultiLineCommentBegin", wxStaticText);
txt_MultiLineCommentBegin->SetLabel(languages[id].multiple_line_comment[0]);
wxStaticText* txt_MultiLineCommentEnd = XRCCTRL(*this, "txt_MultiLineCommentEnd", wxStaticText);
txt_MultiLineCommentEnd->SetLabel(languages[id].multiple_line_comment[1]);
}
--- End code ---
All the above wxStaticText's are defined in the CodeStat XRC as wxTextCtrl's
So I've changed the code accordingly.
Please find attached the source for the fixed CodeStat.
thanks
pecan
[attachment deleted by admin]
Michael:
--- Quote from: Pecan on April 21, 2006, 09:20:42 pm ---Success! Both in windows and in Linux. Whew...!
It seems that there are a lot of evils one can perform under
wxMSW that bites you in the @ss when performed under
wxGTK.
For example, under wxMSW you can allocate a wxStaticText
in code, but define it as a wxTextCtrl in XRC, then use SetLabel() on it when there is NO SetLabel() routine defined for wxTextCtrl.
This doesn't work under Linux.
And... this sort of thing will often case a segfault when running under the
debug version of wxWidgets.
--- Code: ---void CodeStatConfigDlg::PrintLanguageInfo(int id)
{
selected_language = id;
wxStaticText* txt_FileTypes = XRCCTRL(*this, "txt_FileTypes", wxStaticText);
wxString ext_string = _T("");
for (unsigned int i=0; i<languages[id].ext.GetCount(); ++i)
{
ext_string = ext_string + _T(" ") + languages[id].ext[i];
}
txt_FileTypes->SetLabel(ext_string);
wxStaticText* txt_SingleComment = XRCCTRL(*this, "txt_SingleComment", wxStaticText);
txt_SingleComment->SetLabel(languages[id].single_line_comment);
wxStaticText* txt_MultiLineCommentBegin = XRCCTRL(*this, "txt_MultiLineCommentBegin", wxStaticText);
txt_MultiLineCommentBegin->SetLabel(languages[id].multiple_line_comment[0]);
wxStaticText* txt_MultiLineCommentEnd = XRCCTRL(*this, "txt_MultiLineCommentEnd", wxStaticText);
txt_MultiLineCommentEnd->SetLabel(languages[id].multiple_line_comment[1]);
}
--- End code ---
All the above wxStaticText's are defined in the CodeStat XRC as wxTextCtrl's
So I've changed the code accordingly.
Please find attached the source for the fixed CodeStat.
--- End quote ---
Thank you very much. That was great work :).
Would it possible to add it to the SVN sources?
May be the problem with Settings-->Environment is similar as the Settings-->Editor one.
Now I have just to understand why the deb package generation does not work :).
Best wishes,
Michael
Pecan:
--- Quote from: Michael on April 21, 2006, 09:36:07 pm ---Would it possible to add it to the SVN sources?
--- End quote ---
um.. who is responsible for CodeStat? If no one is,
I'll ask Yiannis for permission to update it, but I don't
want to step on anyones toes.
thanks
pecan
Michael:
--- Quote from: Pecan on April 21, 2006, 09:47:41 pm ---
--- Quote from: Michael on April 21, 2006, 09:36:07 pm ---Would it possible to add it to the SVN sources?
--- End quote ---
um.. who is responsible for CodeStat? If no one is,
I'll ask Yiannis for permission to update it, but I don't
want to step on anyones toes.
--- End quote ---
I understand. I am not sure too, but I think Zlika.
Best wishes,
Michael
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version