Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 How can I stop VA X underlining vector indexes?

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
swolff Posted - Dec 30 2009 : 02:26:41 AM
Hi guys,

I love this software, sooo much, but I have 1 problem.

#include "myclass.h"
...
std::vector<MyClass> myvector;
std::vector<MyClass*> mypointervector;
...
for (i=0;i<myvector.size();i++){
    x1=myvector[i].data;
    x2=myvector.at(i).data;
    x3=mypointervector2[i]->data;
}

It doesn't happen if it's a vector of pointers. It compiles fine and runs fine, etc.

I have version 10.5. My only other plugin is the Qt one.

Thanks for any help.
6   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 04 2010 : 12:21:24 PM
The fact that the order of the header files matters suggests there is some form of macro or #define being used in the header files that is confusing VA.

Can you try making new instances of the two classes after the std::vector instances, and see if the class members are listed and understood correctly? I am wondering if the problem is with the classes themselves, or if it is specific to a vector of the class.

CTPAudioTrack felineInstance1;
CTPLogTrack felineInstance2;
felineInstance1.foo;
felineInstance2.bar;
swolff Posted - Jan 02 2010 : 3:56:36 PM
quote:
On the std::vector<TYPE> lines is the TYPE being shown in the correct colour by VA?

What does VA show in the context and definition fields if you place the caret into the TYPE on this line?

Yes, yes.


The classes have similar names: CTPAudioTrack and CTPLogTrack.

The vectors used to have the same name in wrapper classes before I moved them into the same class and gave them completely different names.

Now it seems elements of 1 of the vectors are always underlined. It switches between the two and I just noticed this... whatever one has the first header file listed will be located properly, and the one with the second header file gets underlined.
feline Posted - Dec 31 2009 : 10:06:04 AM
On the std::vector<TYPE> lines is the TYPE being shown in the correct colour by VA?

What does VA show in the context and definition fields if you place the caret into the TYPE on this line?

Do the two classes that VA seems to have confused have the same name? Do they have anything in common that might help to explain why this is happening?
swolff Posted - Dec 31 2009 : 01:13:35 AM
It's happening again!

Changed my vectors to hold pointers only, still happening.

It seems that VA X has confused 2 of my classes. when I index into the one which has all the red underlines, it suggests elements of the other class.
swolff Posted - Dec 30 2009 : 7:25:54 PM
Hello,
I only have 1 project going on here, but it's not happening on any small examples.

I've now split all my classes into separate files and it seems to be gone at least for now. Would this have something to do with it?


VA_X.dll file version 10.5.1711.0 built 2008.12.11
DevEnv.exe version 9.0.21022.8
msenv.dll version 9.0.21022.8
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.5512
Windows XP 5.1 Build 2600 Service Pack 3
4 processors
feline Posted - Dec 30 2009 : 3:10:50 PM
Can you please try the following simple test code on your machine and see what results you get? I am not seeing any invalid underlining with this code:

class FelineTestVectorAccess
{
public:
	int nFelineSize;
};

static void testUsingVectorAccess()
{
	std::vector<FelineTestVectorAccess> myvector;
	std::vector<FelineTestVectorAccess *> mypointervector;

	myvector[0].nFelineSize;
	myvector.at(0).nFelineSize;
	mypointervector[0]->nFelineSize;
	banana = 3;	// invalid code, the only thing underlined here
}


Can you please go to:

VA Options -> System Info -> Copy Info

and paste the details (from the clipboard) into your reply. This will give us the basic information about your setup.

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