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
 method name / variable name coloring conflict
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kmw
Junior Member

10 Posts

Posted - Sep 16 2008 :  9:02:05 PM  Show Profile  Reply with Quote
This example shows that a method name that matches an identifier name is colored as a local-to-file identifier instead of a method:

class A
{
int foo( int bar );
int bar()
{
return 3;
}
};

the method bar() is colored not as a method, but as a variable.

Versions: VA X trial demo ( version 10.4.1647.0 built 2008.07.30 ) running inside Microsoft Visual C++ Version 2005

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Sep 17 2008 :  6:56:12 PM  Show Profile  Reply with Quote
To a degree this is a known problem. The basic problem is that our colouring code has to run very quickly, to keep up with scrolling through the code, and it also has to work behind the IDE's back, so we do not have full control of the display.

So it is possible to confuse our colouring code, using the same name for different things in the same file is a good way to do this.

Do you have a lot of cases like this in your code?

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

kmw
Junior Member

10 Posts

Posted - Sep 17 2008 :  7:10:53 PM  Show Profile  Reply with Quote
> Do you have a lot of cases like this in your code?

There are enough cases so that it is distracting and confusing at times. I love it when it works but it really "takes me out of the zone" when it's wrong.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Sep 22 2008 :  10:24:01 AM  Show Profile  Reply with Quote
I have put in a bug report for this, but it is unlikely to be fixed quickly, since this is a hard problem for VA to solve correctly:

case=19889

For now have you considered renaming some of these "overlapping" parameters?

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

kmw
Junior Member

10 Posts

Posted - Sep 22 2008 :  5:11:09 PM  Show Profile  Reply with Quote
I can do that in the new code that I write but not in existing code of others.
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