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
 [1812] Incorrect struct VA suggestion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pk_asw
Ketchup Master

Czech Republic
66 Posts

Posted - Feb 28 2010 :  08:39:58 AM  Show Profile  Reply with Quote
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

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 28 2010 :  8:07:56 PM  Show Profile  Reply with Quote
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.

Edited by - accord on Feb 28 2010 8:14:49 PM
Go to Top of Page

pk_asw
Ketchup Master

Czech Republic
66 Posts

Posted - Mar 01 2010 :  03:05:07 AM  Show Profile  Reply with Quote
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.

Edited by - pk_asw on Mar 01 2010 03:06:16 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 01 2010 :  1:26:59 PM  Show Profile  Reply with Quote
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.
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