Author Topic: Code completion for class in namespace  (Read 3957 times)

jleedixon

  • Guest
Code completion for class in namespace
« on: November 12, 2008, 08:12:09 pm »
I'm a newbie to code::blocks, and am pretty impressed so far.  Code completion works well, but it seems to not work well with namespaces.  My example is pretty simple.  When I try to do code completion to get the "myVar" attribute, I get no listing at all.  If I just remove the MyClass from the namespace, it works fine.

Is there a setting somewhere that I am missing?  Can anyone else verify this problem, or is it just me?  I have searched the forums but haven't seen anybody ask about this recently.

(Using v 8.02 on Ubuntu 7.10)

----- header file --------
namespace MyNamespace
{
  class MyClass
  {
  public:
    void MyFunc();
    int myVar;
  };

};



--- source file ---

#include "header file"

using namespace MyNamespace;

void MyClass::MyFunc()
{
  myVar = 5;   // code completion does not work here
}


Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code completion for class in namespace
« Reply #1 on: December 25, 2008, 02:37:39 pm »
I tested it in the svn version of windows.
It still doesn't work. :(.

But, if you comment the namespace related code, it can work OK.

And there's no place to report this kind of bug to the developers. I search the forum with the keyword "code completion, many related question has left alone with no answers. :(
« Last Edit: December 25, 2008, 05:58:19 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.