Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 class object colouring

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
billhilly Posted - May 11 2018 : 03:51:29 AM
I am having trouble with class (C++) object colouring. It is not consistent.

Some class object names show up correctly, same colour as variables, But others sometimes revert to the colour of functions. Although not consistent it seems to happen when there is more than 1 level of include to go through to get to the class object declaration.

ie
in blah.h // extern obj colour ok
in blah.cpp // object created colour ok
in main colour wrong
where blah.h is included through blahblah.h
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 12 2018 : 09:10:52 AM
Thank you for the clear example, I am seeing the same problem here. This is currently a known problem, I have added this example to the bug report:

case=60805

The problem case looks like a function declaration, especially since it is at global scope. Our colouring code is designed to run quickly, so it can keep up with code scrolling, so it is possible to confuse it now and then, as has happened here.
billhilly Posted - May 11 2018 : 8:00:03 PM
Hi Feline,
i dont have any carrots :<, but alt g does take you to the class declaration.

this causes colours to be wrong
-------------------------------------------------
const uint8_t sz = 24;
uint8_t test_storage[sz];
Byte_Buffer my_buf(test_storage, sz); // wrong

int main(void)
{
my_buf.flush (); // wrong
}

but this creates the correct colours
-------------------------------------------------
const uint8_t sz = 24;
uint8_t test_storage[sz];

int main(void)
{
Byte_Buffer my_buf(test_storage, sz);

my_buf.flush ();
}

declared inside main seems to be ok
feline Posted - May 11 2018 : 06:47:06 AM
When you see this problem, if you place the caret into the class member with the wrong colour, what is VA showing in its context and navigation fields? These are normally at the top of the editor window, and are where the alt-m list appears.

If you press alt-g what happens? You should be taken to the class member declaration, but if this is happening because something is confusing our parser something else may happen.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000