Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 [1812] Incorrect struct VA suggestion

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
pk_asw Posted - Feb 28 2010 : 08:39:58 AM
Hello,
I'm using VS 2008 and here is a .CPP sample file: http://public.avast.com/~kurtin/test.cpp.

If I want to access the structure variables within "req->Header", VA suggests "->" instead of "." - if I do the same for "req->Header2", VA will use the right prefix, i.e. "."
quote:


Thanks, Petr
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Mar 01 2010 : 1:26:59 PM
This is interesting. You can check how Visual Assist recongizes Header in your "real" and your test project: just move the caret over the symbol "Header" and you will see the recognized type in the right part of VA navigation bar, which is over the editor window, next to the green goto icon. Can you please paste the content of this area here, both from your test and "real" project? This may give us a clue regarding this problem.
pk_asw Posted - Mar 01 2010 : 03:05:07 AM
If I open test.cpp in a new VS 2008 SP1 instance, it works well. However, if I use the same code within my project then when I type "." after "req->Header", VA replaces it as "->". This is the only structure where VA replaces it incorrectly, I don't have this problem with other structures. Maybe VA references "Header" name to a different structure (declared as pointer to a structure), is it possible?

I use default settings and I didn't find "recursive macro parsing" option as you asked.
accord Posted - Feb 28 2010 : 8:07:56 PM
Just to clear up: are you typing . after req->Header and VA corrects it to -> ?
I wasn't able to reproduce this using VS2008 SP1 or VS2010 rc1 with VA 1812.

Have you turned on recursive macro parsing, or have you modified any other VA registry settings?

You can turn off . to -> correction as a workaround:

VA Options -> Advanced -> Correction -> Convert dot to -> (only in C/C++ files)

or you can use undo to revert the correction, so you will get back req->Header.

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