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
 Constantly replace . by ->
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 07 2013 :  2:29:07 PM  Show Profile  Reply with Quote
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


IAF

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 07 2013 :  7:19:58 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 11 2013 :  02:25:18 AM  Show Profile  Reply with Quote
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.

IAF
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 11 2013 :  11:31:39 AM  Show Profile  Reply with Quote
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++)
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 11 2013 :  4:44:38 PM  Show Profile  Reply with Quote
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.

IAF
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 12 2013 :  05:08:05 AM  Show Profile  Reply with Quote
Does those people experience the problem as well? I'm wondering whether the problem is specific to your environment (settings, etc.)

Edited by - accord on Mar 12 2013 05:08:56 AM
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 12 2013 :  11:05:33 AM  Show Profile  Reply with Quote
Yes, it is common problem for all who are working with this solution and using VA X.

IAF
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 12 2013 :  3:11:49 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 12 2013 :  4:22:41 PM  Show Profile  Reply with Quote
Unfortunately there are some complex macros.
Is it possible to detect which one confuses VA?

IAF
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 12 2013 :  4:25:34 PM  Show Profile  Reply with Quote
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.

IAF

Edited by - Ivan A. Fotan on Mar 12 2013 8:00:42 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 13 2013 :  11:54:04 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 13 2013 :  6:25:15 PM  Show Profile  Reply with Quote
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.

IAF
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 14 2013 :  09:24:30 AM  Show Profile  Reply with Quote
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)
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 14 2013 :  5:00:06 PM  Show Profile  Reply with Quote
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.

IAF
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 15 2013 :  3:37:47 PM  Show Profile  Reply with Quote
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.)
Go to Top of Page

Ivan A. Fotan
Ketchup Master

Ukraine
67 Posts

Posted - Mar 19 2013 :  12:00:30 PM  Show Profile  Reply with Quote
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)

IAF
Go to Top of Page

Old as dirt
Tomato Guru

USA
246 Posts

Posted - Mar 19 2013 :  1:38:08 PM  Show Profile  Reply with Quote
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"

Ken
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 19 2013 :  4:05:21 PM  Show Profile  Reply with Quote
Ivan A. Fotan: we are discussing this internally to see who will do this. We will get back to you.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 19 2013 :  4:30:30 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Mar 19 2013 :  4:46:58 PM  Show Profile  Reply with Quote
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
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 25 2013 :  2:32:31 PM  Show Profile  Reply with Quote
case=73142 is fixed in build 1936
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000