Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: perento on May 30, 2012, 01:29:11 am

Title: bug in commet line
Post by: perento on May 30, 2012, 01:29:11 am
Code
void HANGMAN::ClearScreen(){  //Clears the screen in radius {80,30}
    COORD homeCoord = {0,0};
   
    //{80,30} is enough to clear the previous game <- this line
    SetConsoleCursorPosition (hStdout, homeCoord);
    for (int row = 0; row < 30; row++){
        for (int col = 0; col < 80; col++){
            cout << ' ';
        }
    }
    SetConsoleCursorPosition (hStdout, homeCoord);
}

the combo of //{ , if your try to hide that function body, you will hide all of the .cpp file, and you cant get acces to the functions below ClearScreen().
If i make // { with a whitespace, everything will be ok, but without a whitespace it get bugged
Title: Re: bug in commet line
Post by: oBFusCATed on May 30, 2012, 01:47:36 am
Screen shot? (please use image sharing site, not the attachment feature of the forum).

Also please post some version information, my magic ball is pretty exhausted by now, no more mana is telling me...
Title: Re: bug in commet line
Post by: perento on May 30, 2012, 02:48:24 am
http://prikachi.com/images/909/4831909w.jpg here is with whitespace // {
http://prikachi.com/images/910/4831910z.jpg here is without whitespace //{

PS; could you please give me a short feedback on what you think of that .h design. I wanna make some good design habits but dont know how it goes.
Title: Re: bug in commet line
Post by: oBFusCATed on May 30, 2012, 09:14:27 am
Hm, this might be a feature of Scintilla to support regions and it might be buggy in 10.05 :)
Can you try a nightly build, because in my version r8020 it works way better.
The strange thing is that the ///@{ ///@}, the doxygen region markers, do not produce the same result.
Morten do you know something about this "feature"?

PS; could you please give me a short feedback on what you think of that .h design. I wanna make some good design habits but dont know how it goes.
No, this is not a general programming forum ... try in stackover or comp.lang.c++ or comp.lang.c++.moderated.
Title: Re: bug in commet line
Post by: MortenMacFly on May 30, 2012, 10:43:36 am
Yes, this is a special feature of scintilla. These regions help you to collapse parts of your code. wxSmith also makes use of this in a similar fashion. If you don't want that, make a space in between. There might also be an option to disable such regions, but I don't think its wise to apply this because this is really a nice feature (which I am using rather regularly btw...).