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
 How can I stop VA X underlining vector indexes?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

swolff
New Member

4 Posts

Posted - Dec 30 2009 :  02:26:41 AM  Show Profile  Reply with Quote
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.

feline
Whole Tomato Software

United Kingdom
19001 Posts

Posted - Dec 30 2009 :  3:10:50 PM  Show Profile  Reply with Quote
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.

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

swolff
New Member

4 Posts

Posted - Dec 30 2009 :  7:25:54 PM  Show Profile  Reply with Quote
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
Go to Top of Page

swolff
New Member

4 Posts

Posted - Dec 31 2009 :  01:13:35 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19001 Posts

Posted - Dec 31 2009 :  10:06:04 AM  Show Profile  Reply with 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?

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?

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

swolff
New Member

4 Posts

Posted - Jan 02 2010 :  3:56:36 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19001 Posts

Posted - Jan 04 2010 :  12:21:24 PM  Show Profile  Reply with Quote
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;

zen is the art of being at one with the two'ness
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