News:

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

Main Menu

Nothing happend when use "->" or "::"

Started by montchai, July 19, 2005, 12:45:48 PM

Previous topic - Next topic

montchai

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

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

:(  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.

mandrav

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

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

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"?

rickg22

Guest: First of all.

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

Anonymous

I download from the website. If I download from CVS is better?

Anonymous

I forgot to tell that version of my C::B is
"codeblocks-1.0-finalbeta_mingw" download from this website

rickg22

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

thomas

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

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.

thomas

Quote from: Anonymous 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.
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:
virtual void SetA(Type parameter) = 0;
then they are pure virtual, and you must implement them.
If they are defined like this:
virtual void SetA(Type parameter);
Then they are just ordinary virtual functions. You can implement them.

Quote from: Anonymous on July 23, 2005, 01:26:32 PM
how do you do to remember functions of other 3 classes that are the member of it HAH!
Do you mean something like this?

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

I think he's saying that ancestor virtual functions aren't showing up in descendent codesense completion popups.

rickg22

Yes, that's a common complaint we've had. Yiannis has to fix that...