News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Objects of a class

Started by al7amimi, October 28, 2013, 09:58:06 PM

Previous topic - Next topic

al7amimi

Correct me if I am wrong. If I am not mistaken in the older releases the editor was able to auto-complete the members of a user defined class as if I was typing a C++ keyword. Is this still possible? Where exactly in the settings that option is available ?

thnx

This thing is still broken
basically in one file the editor was auto completing the headers of the members, in another file, the just like before failed to auto complete the headers of the class members. Any clues?!

thnx


al7amimi


Alpha

Code::Blocks version?  Are you using a project?  Are file extensions standard?

al7amimi

Quote from: Alpha on November 01, 2013, 02:33:25 AM
Code::Blocks version?  Are you using a project?  Are file extensions standard?

great! yes I am using 12.11, and the extension is .cpp. I did make sure to save the file and test to see if the members' headers are suggested by the editor, but that did not happen. I have to mention that in one particular cpp file -I dont use projects-, the editor miraculously suggested all headers, in that particular case -if it does help- the class name was Employee! I know, that sounded dumb, but I wanted to mention it.

I am serious in seeking help regarding this issue since that particular feature is one of the strongest points to minimize my typo errors...

thnx in advance,

Alpha

Check under:
Settings->Editor->Code completion
what you have enabled/disabled.  If changing settings in there does not help, you can try the latest nightly build (the CodeCompletion plugin has received many fixes and improvements since 12.11).
Also, what OS are you on?

al7amimi

Can you please check the attached image to verify that the settings are correct?!

thnx

[attachment deleted by admin]

Alpha

Settings look like they should work.  Can you give exact steps to reproduce?

dmoore

I can't reproduce OPs problem. I tried the following code saved as main.cpp with no project on Linux with recent rev of trunk


#include <stdio.h>
#include <string.h>

class myclass
{
public:
   myclass() {}
   int myfunc(int a)
   {
       return a+1;
   }

};

int main()
{
   myclass a=myclass();
   a.|
}


a. offers myfunc as would be expected
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

al7amimi

I am forced to disable/enable code completion and restart every time to enable this feature?! The older version did not have such issue...so what do you guys think?!

thnx

al7amimi

#9
Restarting the editor every time is not fair if you ask me...

oBFusCATed

Your last comment doesn't help much in resolving the problem!

There is no such feature added in C::B 12.11 or later that requires you to restart the IDE for CC to work correctly.
Please try a night build or post a minimal sample and steps that reproduces the problem.

Keep in mind that the current implementation of the parser doesn't support complex marco or template expressions in the code, so this might be the cause.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

al7amimi

#11
I just restarted the application to enforce auto-completion

al7amimi


BlueHazzard

Quote from: oBFusCATed on November 04, 2013, 11:38:08 AM
Your last comment doesn't help much in resolving the problem!

There is no such feature added in C::B 12.11 or later that requires you to restart the IDE for CC to work correctly.
Please try a night build or post a minimal sample and steps that reproduces the problem.

Have you tried a nightly build?