Author Topic: Code Completion just working "sometimes"  (Read 3358 times)

ProbablyX

  • Guest
Code Completion just working "sometimes"
« on: May 27, 2008, 06:05:19 pm »
Hello :)

I'm trying out C::B with wxWidgets and I seem to have a kinda weird problem.

If I drop a button on a form (using the standard form designer), then a wxDirDialog and make an onClick event for the button I cant use code-completion.

If I start writing wxDirDialog the code completion appears, but if I want to access the DirD I dropped on my form (let's call it a) tying a or a. or a-> or a:: doesnt give me anything at all.

Same thing if I do this:
wxDirDialog b = new wxDirDialog()

the code compleiton will help me write wxDirDialog and list the creation parameters for it but when I furter down type b or b-> or what ever nothing happens.

I can compile and run my apps fine using the a and b variables, its just the code compleiton that doesnt work, can this be fixed?

Thanks :)

Offline chca

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code Completion just working "sometimes"
« Reply #1 on: May 27, 2008, 07:57:10 pm »
I'm suffering from such a problem, too. Seems to be similar to this one:

http://forums.codeblocks.org/index.php/topic,8375.0.html

Can you check the example code?

ProbablyX

  • Guest
Re: Code Completion just working "sometimes"
« Reply #2 on: May 27, 2008, 08:17:41 pm »
yeh, seems to be the same problem.. It's weird that it hasn't been fixed or resolved =/
Im using Kubuntu 8.04 amd64 so it might be related to the OS. I'm using an SVN build though (from the debian repo found in codeblocks wiki)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Code Completion just working "sometimes"
« Reply #3 on: June 02, 2008, 11:57:36 am »
wxDirDialog b = new wxDirDialog()

when I furter down type b or b-> or what ever nothing happens.
If that is really your code than you are in trouble and the CC plugin cannot know what you want. You create a pointer by using NEW. But you are assigning the value to an object instance variable but then try to access members of a pointer again. That won't work. I wonder that this ever compiled btw...

In addition;: Keep in mind that for new source code you need to save the file (frequently) to let the parser re-parse what you have written. Everything between the last save operation til' you trigger CC is unknown for CC.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ