Author Topic: Nothing happend when use "->" or "::"  (Read 15296 times)

montchai

  • Guest
Nothing happend when use "->" or "::"
« on: July 19, 2005, 12:45:48 pm »
I used Code::Blocks for 2 months and I still have some problem. I create 2 classes in a project such as class A &B, but when I call class A's member function from class B by use "->" . Nothing popup to the editing screen. But when I looked at the screen shot, it show.

I don't know what happend with my program, but I don't think it's the C::B's bug for sure. Anyone can tell me what is it and how can I fix this problem?
Thanx

Anonymous

  • Guest
Nothing happend when use "->" or "::"
« Reply #1 on: July 19, 2005, 04:19:29 pm »
The first thing to do is learn how to ask a proper question and provide adequate information.  Regardless , it's not a CodeBlocks problem.

montchai

  • Guest
Nothing happend when use "->" or "::"
« Reply #2 on: July 19, 2005, 10:05:10 pm »
:(  Sorry about silly question, but I use Code::Blocks with Ogre3D for making game and it's didn't show. When I create classes for my own, the popup showed. But when I use classes of Ogre3D in dll files It's not show. I don't know why it's missing.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Nothing happend when use "->" or "::"
« Reply #3 on: July 19, 2005, 10:08:50 pm »
Make sure "Settings->Configure plugins->Code completion->Follow GLOBAL includes" is checked.
Then (with your project open) go to the "Symbols" tab in the project manager, right-click on "Symbols" and press "Re-parse now" to re-scan the source files immediately.

Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
Nothing happend when use "->" or "::"
« Reply #4 on: July 19, 2005, 10:39:27 pm »
Thank you so much for your advice. everything is almost ok, member function and variable is show out. But When I check "Follow GLOBAL includes" it show an error message " Can not wait for thread termination (error 6: the handle is invalid.) I don't know what does it mean.

Help me again Yiannis, please.

Anonymous

  • Guest
Nothing happend when use "->" or "::"
« Reply #5 on: July 19, 2005, 11:15:35 pm »
And silly question again, I hope it's will be the last monkey question.

for some class such as
   -"class X" has virtual function "setA()"  
   -"class Y" is deride class of "class X" and has virtual function "setB()"

it mean "class Y" must have "setA()" to be a member function of class Y  too?

but when I check the parser popup, it didn't have setA() in class Y!! and when I don't use SmartSense it show that have in "class X" only(X::setA()).
Can you tell me that why it not show in "class Y"?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Nothing happend when use "->" or "::"
« Reply #6 on: July 19, 2005, 11:29:00 pm »
Guest: First of all.

What version of Code::Blocks are you using? IIRC, some of the parser popups got fixed in CVS.

Anonymous

  • Guest
Nothing happend when use "->" or "::"
« Reply #7 on: July 19, 2005, 11:45:53 pm »
I download from the website. If I download from CVS is better?

Anonymous

  • Guest
Nothing happend when use "->" or "::"
« Reply #8 on: July 19, 2005, 11:49:15 pm »
I forgot to tell that version of my C::B is
"codeblocks-1.0-finalbeta_mingw" download from this website

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Nothing happend when use "->" or "::"
« Reply #9 on: July 20, 2005, 12:46:41 am »
Guest:

a) Yes, you should. Many, _MANY_ bugs have been fixed since 1.0-betafinal.
Just make sure you download the "VERSION_1.0" branch. The trunk (HEAD) is the unstable, development version.

b) You should really sign up for the forums. :P

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Nothing happend when use "->" or "::"
« Reply #10 on: July 20, 2005, 10:58:56 am »
Quote from: Anonymous

   -"class X" has virtual function "setA()"  
   -"class Y" is deride class of "class X" and has virtual function "setB()"

it mean "class Y" must have "setA()" to be a member function of class Y  too?


If I understand this right, you ask whether a derived class must implement all virtual functions of its ancestor? It does not need to, unless these are pure virtual functions. Although, if these functions do what their name implies, I do not understand why these two functions should be virtual at all.

Maybe you want to read this:
http://www.parashift.com/c++-faq-lite/virtual-functions.html
(also make sure to read 20.7)


This is not a code::blocks issue, however.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Anonymous

  • Guest
Nothing happend when use "->" or "::"
« Reply #11 on: July 23, 2005, 01:26:32 pm »
I don't know C::B won't support it, coz VC++ supported. I ask you that if you don't know about all function when your class is a derived class of 3 classes but you know only your new functions of your class, how do you do to remember functions of other 3 classes that are the member of it HAH!. please relax before answer me.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Nothing happend when use "->" or "::"
« Reply #12 on: August 11, 2005, 02:57:57 pm »
I don't know C::B won't support it, coz VC++ supported. I ask you that if you don't know about all function when your class is a derived class of 3 classes but you know only your new functions of your class, how do you do to remember functions of other 3 classes that are the member of it HAH!. please relax before answer me.
Sorry, I still cannot make head nor tail out of this, although I have read it about 10 times during the last two weeks.

You derive from two (or in the meantime three) classes.
There are some virtual functions in these classes, and your original question was whether you have to implement them.

If the functions are defined like this:
Code
virtual void SetA(Type parameter) = 0;
then they are pure virtual, and you must implement them.
If they are defined like this:
Code
virtual void SetA(Type parameter);
Then they are just ordinary virtual functions. You can implement them.

how do you do to remember functions of other 3 classes that are the member of it HAH!
Do you mean something like this?
Code
class someclass
{
class x {...};
class y {...};
class y {...};
public:
virtual void SetA(...);
...
};
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

grv575

  • Guest
Re: Nothing happend when use "->" or "::"
« Reply #13 on: August 11, 2005, 08:10:52 pm »
I think he's saying that ancestor virtual functions aren't showing up in descendent codesense completion popups.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Nothing happend when use "->" or "::"
« Reply #14 on: August 11, 2005, 08:22:24 pm »
Yes, that's a common complaint we've had. Yiannis has to fix that...