News:

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

Main Menu

Code completion problem

Started by Pelleschi, July 11, 2011, 04:21:27 PM

Previous topic - Next topic

Pelleschi

Hello,
I inform, i am not well in english, so scuse me !
Before, i solved the problem of the backspace, i have modified the xorg.conf ...
Now, I have a problem with the Code completion, it doesnt work automatically.
In C++, with an object, when i write the ".", it doesnt list all methods of the object, you see ?
Even if i type Ctrl+Backspace it doesnt work ... (but if i type Ctrl+Backspace in front of nothing, it list all type, all object ...)
How can I resolve my problem ?
Thanks !

ps : I am 13 and in france at shcool, the english level is so bad ...

ollydbg

welcome!!
please post the sample/test code, and tell us how to reproduce such kind of bug, so that we can fix it.
Also, which version of c::b did you use???
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Pelleschi

I use Code::blocks 10.05, finally the last release (64 bit, Archlinux).
All example doesnt work with me, in C++, a point (.) after an object doesnt list them methods, you see ?


Folco

You can give the code of a sample project which reproduce that please ? I'm french too, that's not so hard to understand :p
Kernel Extremist - PedroM power ©

Pelleschi

Its a default SFML project
#include <SFML/Graphics.hpp>

int main()
{
   // Create the main window
   sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

   // Load a sprite to display
   sf::Image Image;
   if (!Image.LoadFromFile("cb.bmp"))
       return EXIT_FAILURE;
   sf::Sprite Sprite(Image);
   Sprite. //   /!\ list doesnt appear

// Start the game loop
   while (App.IsOpened())
   {
       // Process events
       sf::Event Event;
       while (App.GetEvent(Event))
       {
           // Close window : exit
           if (Event.Type == sf::Event::Closed)
               App.Close();
       }

       // Clear screen
       App.Clear();

       // Draw the sprite
       App.Draw(Sprite);

       // Update the window
       App.Display();
   }

   return EXIT_SUCCESS;
}

to understand who ?  :mrgreen:

Pelleschi


Manolo

Sometimes I also have this problem :(
Sometimes it gets solved after the file compilation is done :)
Sorry, no more ideas.
HTH
Manolo

Pelleschi


Pelleschi

Good news, code completion work with a personnal class.
It doesnt work with an extern lib (SFML, iostream ...).

Freem

Did you add the path somewhere?
Maybe C::B's don't know where to search the headers...

Or maybe try the nigthlies, CC has been greatly improved since 2010.

Pelleschi

No i didnt, where i can add it ?
Nightlies, its only for windows no ?

Pelleschi

How can I configure "code completion" consider SFML and standar library ?
Thanks !

oBFusCATed

We have nightlies for debian/ubuntu.
Or you could build the svn verison. It is way easier on linux.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Pelleschi

I have the 7363 SVN version, with the bug too ...
QuoteDid you add the path somewhere?
Maybe C::B's don't know where to search the headers...
Yes probably, where can I add manually the headers please ?

ollydbg

Quote from: Pelleschi on August 12, 2011, 08:04:57 PM
How can I configure "code completion" consider SFML and standar library ?
Thanks !
I guess mostly SFML library use some special macro definitions, I will check it today and give you the direction.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.