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
 VA messes up class members of equal named classes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

.oisyn
Tomato Guru

162 Posts

Posted - Oct 26 2009 :  8:25:28 PM  Show Profile  Reply with Quote
I'm seeing this a lot. I have a user-defined Matrix class in some namespace 'foo', and are using a 'using namespace foo;' directive in the top of the file. I've also included the header which contains the definition of Matrix.

#include <windows.h>
#include "matrix.h" // contains Matrix in the foo namespace

using namespace foo;

int main()
{
    Matrix m;
    m. // cursor here
}


When declaring a variable of type Matrix, and issuing a 'go to definition' with the cursor on Matrix in the variable declaration, it correctly jumps to my own Matrix class. However, when using de . operator to access it's members, it lists all members of GDI+'s Matrix class listed in GdiplusMatrix.h. I have not included this file in my project, and the tooltip clearly says that 'm' is of type 'foo::Matrix'. Yet when accessing it's members it thinks something else. This is very annoying.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 27 2009 :  8:04:26 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=34692

For now, you can turn on

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

as a workaround. (It will work if you didn't disabled default intellisense, for example by renaming feacp.dll)
Go to Top of Page

.oisyn
Tomato Guru

162 Posts

Posted - Apr 15 2010 :  10:35:12 AM  Show Profile  Reply with Quote
Note that this also applies to nested classes/structs. For example, in the current codebase we have a Foo::Node and a Bar::Node, and in Foo.cpp it currently thinks every Node is a Bar::Node, even though the sourcefile has no dependency whatsoever on Bar, and a 'go to definition' on Node goes to the right definition. Note that rebuilding the symbol database usually fixes the problem for a while, but later on VAX gets confused again.

Don't know if the problems are related, but they seem to be so I thought I post it here. I'm currently using 1810, in VS 2008

Edited by - .oisyn on Apr 15 2010 10:36:14 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 27 2010 :  2:09:41 PM  Show Profile  Reply with Quote
Do you mean a structure like this?
quote:

class Foo
{
public:
	class Node
	{
	public:
		int Apple;
	};
};

class Bar
{
public:
	class Node
	{
	public:
		int Banaba;
	};

};


I didn't see any problems, but as you said it does not happen immediately.
quote:
it currently thinks every Node is a Bar::Node, even though the sourcefile has no dependency whatsoever on Bar

What indicates that? Do you see wrong items in member listboxes or something else?

Edited by - accord on Apr 27 2010 2:13:30 PM
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