Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Intellisense is incorrect when using List<T>

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
ngorleer Posted - Sep 02 2014 : 08:00:08 AM
I am using C++ CLI in VS2010 SP1 with VAX 10.8.2043.0. When I dereference an item from List<T> then the VAX intellisense shows me the members of List<T> instead of the members of T. Here is a screenshot demonstrating the problem.



It shows AddRange, AsReadOnly, ... instead of Name, Value.
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 12 2014 : 8:50:08 PM
This is exactly what we are looking to do at some point, and why I have made a note of the edits we have made on case=64262.

If you work in several projects you can made these changes to the global stdafx.h file, which is explained in the "Visual Assist build 1908 and older" section, which still works. Or you can simply copy your va_stdafx.h file to each of your solutions.
ngorleer Posted - Sep 10 2014 : 02:34:47 AM
I think the IList and IDictionary entries should be added to the standard va_stdafx.h of the Visual Assist installation so that in the future it will work by default in any .NET solution.
feline Posted - Sep 09 2014 : 2:52:14 PM
Thank you for the update, and also for the extra changes you have made to your va_stdafx.h file, I have put in a bug report for the problems you are seeing, and that this work around fixes it:

case=64262

In an ideal world our parser will understand everything perfectly, and this is something we are working on. However the compiler has the luxury of running code through a pre-processor, which expands and resolves all macros. That's not something we can really do, especially not on code you are working on. So sometimes the va_stdafx.h file is used to help our parser with complex code that is just hard to resolve without doing a full compile.
ngorleer Posted - Sep 08 2014 : 08:49:43 AM
The workaround is working correctly. It also works when I put interface IList<T> instead of class List<T> in the va_stdafx.h file. I think VAX should be intelligent enough to properly support operator[] on System::Collections::Generic::IList<T> and System::Collections::Generic::IDictionary<T> by default without a va_stdafx.h file.

Here is the contents of my va_stdafx.h file:

namespace System::Collections::Generic
{
template<typename T>
interface IList
{
T operator->();
T operator[]();
T operator*();
};

template<typename K, typename V>
interface IDictionary
{
V operator->();
V operator[]();
V operator*();
};
};

feline Posted - Sep 04 2014 : 6:15:54 PM
I think I have a work around, it is working correctly for me. Can you please create a new text file called "va_stdafx.h" file, and place it in the same directory as your SLN or VCXPROJ file. There is no need to add the file to your solution, VA searches for the file and uses it to help the parser understand code, which is explained here:

http://docs.wholetomato.com/default.asp?W302

Edit the file, and add the code:

namespace System::Collections::Generic
{
	template<typename T>
	class List
	{
		T operator->();
		T operator[]();
		T operator*();
	};
};


Make sure the file ends with a blank line. Now press the button:

VA Options -> Performance -> Rebuild symbol databases

and restart the IDE and reload your solution. Does this fix the problem for you?

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