Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA messes up class members of equal named classes

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
.oisyn Posted - Oct 26 2009 : 8:25:28 PM
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.
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Apr 27 2010 : 2:09:41 PM
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?
.oisyn Posted - Apr 15 2010 : 10:35:12 AM
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
accord Posted - Oct 27 2009 : 8:04:26 PM
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)

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