User forums > Help
Help: CodeCompletion gets confused?
(1/1)
MortenMacFly:
Dear all,
I have a problem which I would like to get confirmed. Please consider the following code:
--- Code: ---struct s_struct
{
double d_double[3];
float f_float;
int i_int;
};
typedef struct s_struct s_struct;
int main()
{
s_struct s;
//s. // << CC does not work after "strg + space"
//s_struct. // << here CC works (?!)
return 0;
}
--- End code ---
the two lines in main() that I have commented out causing me a headache. CC at this point *knows* about the struct "s_struct" - that's for sure. Anyway, when I enter "s." and press "strg + space" (to trigger CC) nothing happens. But: If I enter "s_struct." and press "strg + space" I see all members of the typedef. Now of course the second is not what I want, really. ;-)
Anyway: It seems this differs from C::B to C::B. So my question is: Could somebody confirm that this happens to him/her, too?
With regards, Morten.
Indrekis:
Both "s." and "s_struct." followed by ctrl-space showed members of the structure :)
Tested in CB, built from sources, revision 3035, with the exception that it is built against non-monolithic wxWidgets (2.6.3) library, under WindowsXP SP2.
MortenMacFly:
Ok - I really don't get this. I have attached a very simple project to this post. I do the following:
1.) Open this project in C::B (nightly, 7th, 8th, my own version - doesn't matter).
2.) Un-comment the line with "s_struct.", save the file and put my cursor after the dot. Then I press "ctrl + space" -> result: CC works fine.
3.) I comment this line again and un-comment the line with "s." and save. Again I put my cursor after the dot (of this line) and press "ctrl+space". Guess what: Nothing happens.
Please could some more people try with this project and share their experiences with me?
@Indrekis: Could you try again with this project?
With regards, Morten.
[attachment deleted by admin]
Indrekis:
--- Quote from: MortenMacFly on October 08, 2006, 07:48:59 pm ---@Indrekis: Could you try again with this project?
--- End quote ---
Morten, I have tried, using your instructions and your project. The CB/CC behaved exactly as your described.
But when line endings in main.cpp, which were of Linux-style - LF only, were replaced by Windows style - CR-LF, CC started to work as expected in both cases!
MortenMacFly:
--- Quote from: Indrekis on October 09, 2006, 12:05:34 am ---
--- Quote from: MortenMacFly on October 08, 2006, 07:48:59 pm ---@Indrekis: Could you try again with this project?
--- End quote ---
Morten, I have tried, using your instructions and your project. The CB/CC behaved exactly as your described.
--- End quote ---
Thanks a lot. The mandrav-master has fixed this in SVN. Luckily this was reproducible...
With regards, Morten.
Navigation
[0] Message Index
Go to full version