Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 class object colouring
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

billhilly
New Member

2 Posts

Posted - May 11 2018 :  03:51:29 AM  Show Profile  Reply with Quote
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

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 11 2018 :  06:47:06 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

billhilly
New Member

2 Posts

Posted - May 11 2018 :  8:00:03 PM  Show Profile  Reply with Quote
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
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 12 2018 :  09:10:52 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000