Code::Blocks Forums

User forums => Help => Topic started by: Lugaidster on May 19, 2008, 06:55:55 am

Title: I have a question regarding code Completion.
Post by: Lugaidster on May 19, 2008, 06:55:55 am
Code
typedef struct {
    int a, b;
} testStruct;

#define TESTDEFINE (*((testStruct*)0x04000008))

Take the above code for example

why does the following work the way it should by showing the members of the struct:

Code
(*((testStruct*)0x04000008)). // <-- notice the dot

but this does not:

Code
TESTDEFINE. // <-- notice the dot

Shouldn't it work just as well?? (I'm talking about the little window that appears showing the members of the struct when you put the "." after the identifier). I know that this is a very special case but still, if the former example works why shouldn't the latter one? Anyway, I hope you can help me.
Title: Re: I have a question regarding code Completion.
Post by: Ceniza on May 19, 2008, 08:36:14 am
I do really doubt the current implementation of Code-Completion does any kind of macro-replacement. The good news is that I'm finishing my preprocessor implementation, so it could possibly, just possibly, be used to 'complement' that plugin in the meanwhile.
Title: Re: I have a question regarding code Completion.
Post by: JGM on May 20, 2008, 12:06:54 am
The good news is that I'm finishing my preprocessor implementation, so it could possibly, just possibly, be used to 'complement' that plugin in the meanwhile.

Those are really good news! :D
Title: Re: I have a question regarding code Completion.
Post by: golagha on May 20, 2008, 07:37:44 am
I have another question concerning code completion.

Code completion doesn't show anything about overloaded member operators. Why?

Actually we do not need to use a code like this:

T1.operator < (T2);

In fact we use it simply by:

T1 < T2;

but assume that I need to know about overloaded member operators of a class before receiving any error from compiler. of course, when I see a message like this : operator < is not implemented for object "TObject T" I understand what it means but code completion can save our time to have a quick view to all overloaded member operators.

Regards
Title: Re: I have a question regarding code Completion.
Post by: Ceniza on May 20, 2008, 07:52:30 am
Well, keep in mind Code-Completion is work in progress. There are lots of things that the current implementation doesn't recognise. If you check the list of bugs and feature requests for Code-Completion you'll get an idea of how far from complete it is.
Title: Re: I have a question regarding code Completion.
Post by: Michael on May 20, 2008, 09:47:49 am
The good news is that I'm finishing my preprocessor implementation, so it could possibly, just possibly, be used to 'complement' that plugin in the meanwhile.

Great :D.

All the best
Michael