Author Topic: Objects of a class  (Read 7732 times)

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Objects of a class
« on: October 28, 2013, 09:58:06 pm »
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

« Last Edit: November 01, 2013, 01:35:12 am by al7amimi »

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Objects of a class
« Reply #1 on: November 01, 2013, 01:35:23 am »
up

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Objects of a class
« Reply #2 on: November 01, 2013, 02:33:25 am »
Code::Blocks version?  Are you using a project?  Are file extensions standard?

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Objects of a class
« Reply #3 on: November 01, 2013, 04:40:11 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,

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Objects of a class
« Reply #4 on: November 02, 2013, 12:41:12 am »
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?

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Objects of a class
« Reply #5 on: November 02, 2013, 02:41:24 am »
Can you please check the attached image to verify that the settings are correct?!

thnx

[attachment deleted by admin]

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Objects of a class
« Reply #6 on: November 02, 2013, 08:52:41 pm »
Settings look like they should work.  Can you give exact steps to reproduce?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Objects of a class
« Reply #7 on: November 02, 2013, 09:14:57 pm »
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

Code
#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

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Objects of a class
« Reply #8 on: November 04, 2013, 03:15:33 am »
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

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Objects of a class
« Reply #9 on: November 04, 2013, 11:11:00 am »
Restarting the editor every time is not fair if you ask me...
« Last Edit: October 03, 2017, 02:21:22 pm by al7amimi »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Objects of a class
« Reply #10 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.

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!]

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Objects of a class
« Reply #11 on: November 06, 2013, 05:57:53 am »
I just restarted the application to enforce auto-completion
« Last Edit: October 03, 2017, 02:21:46 pm by al7amimi »

Offline al7amimi

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Objects of a class
« Reply #12 on: November 12, 2013, 10:28:28 am »
up

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Objects of a class
« Reply #13 on: November 12, 2013, 10:52: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?