Code::Blocks Forums

User forums => Help => Topic started by: IanConner on November 12, 2015, 07:39:32 pm

Title: Code Completion Question [Solved]
Post by: IanConner on November 12, 2015, 07:39:32 pm
I was trying out Code:Bocks by playing around with the default wxWidgets frame based application generated by Code:Blocks, when I noticed some functions weren't auto completing.

To give an example from the default application, a main window class is declared that inherits from wxFrame:

class wxWidgetsTestFrame: public wxFrame

In the OnInit() function it creates an instance of this class called fame:

bool wxWidgetsTestApp::OnInit()
    wxWidgetsTestFrame* frame = new wxWidgetsTestFrame(0L, _("wxWidgets Application Template"));
    frame->SetIcon(wxICON(aaaa)); // To Set App Icon
    return true;

The wxWidgets documentation shows that wxFrame inherits indirectly from wxWindow (, so I would expect that any calls made on the frame object to wxWindow functions would auto complete.  However, if I try to call a wxWindow function on frame in the above function it doesn't complete.  For example if I start typing frame->SetSize, SetSize doesn't show in the function list and the parameter list doesn't appear when I type the opening parenthesis.  Code completion is working for all wxFrame functions, but not for the functions it inherits from higher up in the class hierarchy.

Should code completion be working when calling a wxWindow function from a wxFrame object or does Code::Blocks not support code completion for inherited functions?

If it should be working, do you have any idea why it's not working on my installation?  I'm using Code::Blocks 13.12 and wxWidgets 3.0.2 on Windows 7 64bit.

Thanks for any advice you can offer.
Title: Re: Code Completion Question
Post by: ollydbg on November 13, 2015, 12:57:39 am
Works fine here, you should use a nightly build version of C::B. The official 13.12 version is quite old.
Title: Re: Code Completion Question [Solved]
Post by: IanConner on November 13, 2015, 03:05:10 pm
I downloaded the 09 November 2015 build (10561) and code completion works perfectly in that.

When I downloaded Code::Blocks I just went for the latest stable version as I assumed nightly builds were for testing, and I didn't notice how old the last stable release was.

Thanks for the assistance.