Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Commaster on September 28, 2015, 07:26:40 pm

Title: Variable tooltip confusion
Post by: Commaster on September 28, 2015, 07:26:40 pm
First of all, sorry for a non-informative title...

(Potentially important details: r10507, Ubuntu x64, wx2.8.12, wx Project)

Let's say we have somewhere early on in the .cpp file:
Code
BetterwxObject* Layer = NULL;
If we hover over the "Layer", we get the proper tooltip
Code
BetterwxObject* Layer
So far so good. And for many more occurences of this "Layer" variable.
Until, several screens lower, we stumble upon this:
Code
if (!SomeBoolean && Layer)
After this line comes into view (and maybe hoverting over the Layer in this line), the Layer tooltip permanently (until restart) gets ruined into:
Code
! SomeBoolean&& Layer
Title: Re: Variable tooltip confusion
Post by: oBFusCATed on September 28, 2015, 08:07:25 pm
Can you post a minimal code sample that demonstrates the problem?
Title: Re: Variable tooltip confusion
Post by: Commaster on September 28, 2015, 11:39:41 pm
Just used the template for a console project and added the mentioned variables.
Code
#include <iostream>

using namespace std;
string* Layer = NULL;

int main()
{
    bool SomeBoolean;
    cout << "Hello world!" << endl;
    if (!SomeBoolean && Layer)
    {
        cout << "Important" << endl;
    }
    return 0;
}

After loading the project, hover over the Layer declaration to see "string* Layer".
Then hover over the occurence inside the if and ruin the tooltip.
(http://i.imgur.com/Hr8wJyw.png)

P.S. tried to reproduce this on 13.12 on windows, couldn't.
Title: Re: Variable tooltip confusion
Post by: ollydbg on September 29, 2015, 12:18:21 am
Thanks for the report, I can confirm this bug in the trunk, and can you wrote a bug report Code::Blocks / Tickets (https://sourceforge.net/p/codeblocks/tickets/?source=navbar), and mention the link here? So that this bug won't lost in the forum.

Thank you!
Title: Re: Variable tooltip confusion
Post by: Commaster on September 29, 2015, 12:32:54 am
#226 -> https://sourceforge.net/p/codeblocks/tickets/226/

Might have been a little too conservative in the description.
Title: Re: Variable tooltip confusion
Post by: Commaster on November 09, 2015, 10:42:39 am
Please close and mark as fixed, most likely by r10557. (tested on r10561)
Thanks!
Title: Re: Variable tooltip confusion
Post by: ollydbg on November 09, 2015, 01:26:04 pm
Please close and mark as fixed, most likely by r10557. (tested on r10561)
Thanks!
Hi, Commaster, thanks for the test, and I close that ticket, indeed this is a regression, see my comments there.