Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Constantly replace . by ->

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
Ivan A. Fotan Posted - Mar 07 2013 : 2:29:07 PM
Recently, VA constantly replaces . by -> in C++ projects.

for example:

RECT cr;
cr.

will be replaced with
cr->

It happens not with all solutions, but with some.
The solution where it is reproduced contains many project (over 70), mostly C++.

VS 2012 with Update 1
VA X 10.7.1929.0 (trial)
Windows 8 x64

20   L A T E S T    R E P L I E S    (Newest First)
support Posted - Apr 25 2013 : 2:32:31 PM
case=73142 is fixed in build 1936
accord Posted - Mar 19 2013 : 4:46:58 PM
Old as dirt: I was able to create a simple test code to reproduce the problem, so I have put in a bug report:

case=73142
accord Posted - Mar 19 2013 : 4:30:30 PM
Ivan A. Fotan: can you please contact us via the following form? A developer will schedule something with you.

http://www.wholetomato.com/support/contact.asp

Please include the URL of this topic so we can match it up.
accord Posted - Mar 19 2013 : 4:05:21 PM
Ivan A. Fotan: we are discussing this internally to see who will do this. We will get back to you.
Old as dirt Posted - Mar 19 2013 : 1:38:08 PM
The . to -> is inconsistent here. Most of the time when it doesn't work as expected for me it doesn't convert the . to -> but I have one case where it converts when I don't want it to. I want to enter
if(ratio[1] > .5) {
and it converts the . so it reads
if(ratio[1] > ->5) {
when I get to the decimal point. The parentheses and brace are put in by VAX when I type "if"
Ivan A. Fotan Posted - Mar 19 2013 : 12:00:30 PM
As I said it happens for almost any class or struct in this solution.
Instead of sending screenshots, I'm ready to provide you remote access via the TeamViewer that may be more helpful.
Just let me know what time is good for you. my time zone is PST (GST-8)
accord Posted - Mar 15 2013 : 3:37:47 PM
Can you please find an object of a class or struct where VA replaces dot to -> ?
1. What is the declaration of this object? Can you please copy-paste it here? Is it in the same method or is the object declaration a member?
2. Do you use macro to declare this object?
3. Do you use macro to define this class/struct or the object's type which is a class or struct?
4. What do you use macros exactly for?
5. Can you please take a screenshot of a problem area where the . to -> happens? It may give us a clue about what's happening. If possible, a screenshot of the declaration of the object and one of the class (the object type) would also be helpful. If you do not want to share it here, please use the below form to send it in, it will be kept private. A screenshot only covers a small area, but a picture is worth a thousand words and it can really help. The more macros the screenshot contains the better :)

http://www.wholetomato.com/support/contact.asp

(Please include the URL of this topic in the description field so we can match it up.)
Ivan A. Fotan Posted - Mar 14 2013 : 5:00:06 PM
1. Turning off the options makes no difference - it still converts dot to -> for RECT, etc.
2. Unfortunately it did not help too
3. No. There are "Rect" (comes from SpiderMonkey) but not "RECT". And the problem is not just with RECT, but with almost any class/structure.
accord Posted - Mar 14 2013 : 09:24:30 AM
1. Can you please try turning off the following setting to see if it makes any difference?
VA Options -> Advanced -> Corrections -> Convert dot to -> if operator -> is overloaded
2. If your project uses macros that call other macros then turning on recursive macro parsing might help depending on the cause of this problem:
http://docs.wholetomato.com?W363
3. Can you please press alt+shift+s in the editor and type .rect ? Does VA find any symbol named RECT inside your project? (ticking Show only symbols defined in current solution helps)
Ivan A. Fotan Posted - Mar 13 2013 : 6:25:15 PM
1. When create new project (solution) VA X works as expected and doesn't replace . with -> neither for the struct RECT nor for the class testclass.
2. Also the problem is not reproduced with the class testclass in a new file in the problematic solution.

Hope that helps, and thanks for your support.
accord Posted - Mar 13 2013 : 11:54:04 AM
If it happens also in a new file it means that the context of the file does not seems to play a role here. Something that can be the case with not fully parsed macros. It doesn't fully role out that the macros are the problem, though.
1. Can you please also try creating a clean new project? VA uses the project's database for newly created files even if they're not part of the project, but a clean new win32 project will use a new database, where the problem should not happen.
2. It would also be helpful to see what happens in a newly created file using a new class, while your main, big project is loaded:

class testclass
{
public:
    int Apple;
};

void testfunc2()
{
    testclass obj;
    obj.
}

These tests can be instructive about where to look for the culprit, how to proceed.
Ivan A. Fotan Posted - Mar 12 2013 : 4:25:34 PM
I created a new file (File -> New -> File... -> Visual C++ -> C++ File), it is even not in the solution, and it converts . to -> in this file too.
Ivan A. Fotan Posted - Mar 12 2013 : 4:22:41 PM
Unfortunately there are some complex macros.
Is it possible to detect which one confuses VA?
accord Posted - Mar 12 2013 : 3:11:49 PM
Are you using any "complex" macros? e.g. that creates code like a class, namespace or member variable, or that "calls" other macros, etc. It can sometimes confuse VA's parser.

If not, can you please try creating a clean new win32 test project and paste the following test code there?

void testfunc()
{
    RECT cr;
    cr.
}

class testclass
{
public:
    int Apple;
};

void testfunc2()
{
    testclass obj;
    obj.
}

Does any of the two dot gets converted to -> ?

Now, can you please load your main solution, try adding a new empty file to it and pasting the same code?
Does any of the two dot gets converted to -> ?

Finally, what if you paste it to the end of an existing file in your real project?

I'm trying to isolate what might be causing this.
Ivan A. Fotan Posted - Mar 12 2013 : 11:05:33 AM
Yes, it is common problem for all who are working with this solution and using VA X.
accord Posted - Mar 12 2013 : 05:08:05 AM
Does those people experience the problem as well? I'm wondering whether the problem is specific to your environment (settings, etc.)
Ivan A. Fotan Posted - Mar 11 2013 : 4:44:38 PM
Rebuilding database as well as removing .sdf/.pch/.pdb etc. doesn't help.
It happen about a month ago, but I cannot remember what causes the problem. Several people are working with the solution and it is not so easy to say which changes have triggered the problem.
accord Posted - Mar 11 2013 : 11:31:39 AM
Can you please try rebuilding your symbol databases to see if it makes any difference?

VA Options -> Performance -> Rebuild

quote:
Recently, VA constantly replaces . by -> in C++ projects.

Did this "just" happen, or did this happen after you upgraded your VA version?
Do you remember any (maybe major) change in you project or project settings that might have triggered this problem?

For now, you can turn off this feature altogether while we are trying to find the culprit:

VA Options -> Advanced -> Corrections -> Convert dot to -> (in C/C++)
Ivan A. Fotan Posted - Mar 11 2013 : 02:25:18 AM
I have absolutely the same list.
The problem occurs not just with RECT but with virtually any class/structure.

I believe the problem is somewhere in solution but I cannot detect what causes the problem for VA X.
accord Posted - Mar 07 2013 : 7:19:58 PM
This is unexpected. Can you please try move your caret over RECT and press alt+g? I get the following list:



Do you get the very same list? Or does VA find something else as well? e.g. in your project? I am wondering what might be confusing VA.

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