User forums > Help
[SOLVED]code completion partially working
Eric:
Hello all,
My configuration:
- Debian sid
- CodeBlocks svn6476 (http://apt.jenslody.de/ packets)
- WxWidgets 2.8.10 (debian sid packets)
I'm using codeblocks for a while now and I haven't succeed with code completion.
As it seems that it's working "out of the box" for many, I must missing something...
What is working:
name completion:
class attributes or method for external libs (here with led widgets: libwxadditions28 from wxformbuilder)
class attributes or method from project
What isn't working is the completion of the wxwidgets classes (here with a statictext for example)
My settings:
compiler
linker
As indicated in
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_get_Code_Completion_to_work.3F
I've tried to add path to wxwidgets includes to C/C++ parser (because wxwidgets includes path is indicated with "`wx-config --cflags --debug=yes`") but with no sucess :?
If someone have an idea ?
Thanks in advance,
Éric.
ollydbg:
Did you mean that only static member variables failed in code completion?
I just do a test with the latest cc_branch, I just define a static member variable in a class, and it works fine. :D
Eric:
--- Quote from: ollydbg on August 16, 2010, 02:56:32 pm ---Did you mean that only static member variables failed in code completion?
I just do a test with the latest cc_branch, I just define a static member variable in a class, and it works fine. :D
--- End quote ---
yes and no...
If I do:
--- Code: ---wxString s;
s.
--- End code ---
give me completion choice for wxString method and that's OK.
But if I'm using a derived class that doesn't work.
For example:
- I've a base class (generated by wxFormbuilder) "Panel_E_S_TOR"
--- Code: ---///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Aug 28 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __Panel_E_S_TOR__
#define __Panel_E_S_TOR__
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/awx/led.h>
#ifdef __VISUALC__
#include <wx/link_additions.h>
#endif //__VISUALC__
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class Panel_E_S_TOR
///////////////////////////////////////////////////////////////////////////////
class Panel_E_S_TOR : public wxPanel
{
private:
protected:
wxStaticText* m_staticTextNum;
awxLed* m_awxLed;
// Virtual event handlers, overide them in your derived class
virtual void OnLedDClick( wxMouseEvent& event ) { event.Skip(); }
public:
Panel_E_S_TOR( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 110,180 ), long style = wxTAB_TRAVERSAL );
~Panel_E_S_TOR();
};
#endif //__Panel_E_S_TOR__
--- End code ---
- and a derived class "EvtPanel_E_S_TOR" from "Panel_E_S_TOR"
--- Code: ---#ifndef __EvtPanel_E_S_TOR__
#define __EvtPanel_E_S_TOR__
/**
@file
Subclass of Panel_E_S_TOR, which is generated by wxFormBuilder.
*/
#include "Panel_E_S_TOR.h"
class EvtFramePrincipal;
/** Implementing Panel_E_S_TOR */
class EvtPanel_E_S_TOR : public Panel_E_S_TOR
{
protected:
// Handlers for Panel_E_S_TOR events.
void OnLedDClick( wxMouseEvent& event );
public:
/** Constructor */
EvtPanel_E_S_TOR( wxWindow* parent, int num ,EvtFramePrincipal* frame);
void Set();
void Reset();
private:
int m_numero;
EvtFramePrincipal* IHM;
bool etat;
};
#endif // __EvtPanel_E_S_TOR__
--- End code ---
I don't have completion for "m_staticTextNum" in "EvtPanel_E_S_TOR.cpp":
And if I'm trying to create a new wxStaticText (like i've done previously with wxString):
the code completion gives me choices but not "wxStaticText"...
Strange...
Have I done something wrong ?
Éric.
blueshake:
try the cc_branch and may fix your trouble. :D
ollydbg:
it works here, see the image below:( I just use your sample code ), ccbranch and windowx XP, wxWidgets 2.8.11
Navigation
[0] Message Index
[#] Next page
Go to full version