Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Bogus code when typing .* to invoke ptr-to-member

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
legalize Posted - Jun 23 2014 : 9:08:51 PM
Given this code

#include <cassert>

class ChangeSignature
{
public:
    int Method3(int a, int b);
};

int ChangeSignature::Method3(int a, int b)
{
    return a + b;
}

static void TestMethods
{
    ChangeSignature c;
    int (ChangeSignature::*result)(int, int) = &ChangeSignature::Method3;
    int const sum = 
}

Type (c.* right after the = on the last line and VAX inserts bogus code:

    int const sum = (c.Method3*

I verified this came from VAX by disabling VAX and typing the code and then I get exactly what I typed. VAX should never insert incorrect code when I am typing correct code. The correct code is:

    int const sum = (c.*result)(3, 4);
8   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jul 07 2014 : 5:35:24 PM
I feel you, I also make sure I turn off most features that correct what I type or accept listboxes with keys other than tab or enter.
Visual Studio with default settings also accept listboxes (if you don't disable Intellisense).

I have put in a feature request to respect disabling "Auto list members":

case=83533

I only disable 3 features, though:

VA Options -> Corrections -> Repair case
VA Options -> Corrections -> Convert dot to -> if operator -> is overloaded
Tools -> Options... -> Text Editor -> C/C++ -> Advanced -> Member List Commit Characters

These are more of less guesses. I like popping up listboxes, though, most notably smart suggestions:
http://docs.wholetomato.com/default.asp?W172
legalize Posted - Jul 03 2014 : 12:06:49 AM
Yes, if I remove * from the Member List Commit Characters, then it doesn't insert incorrect code.

I don't see the popup box because I'm not waiting for the box to appear before I type *.

The bug is: I'm typing correct code and VAX changes it into incorrect code as I'm typing.

No "autocomplete" feature should ever turn correctly typed code into incorrect code.

It is exactly this sort of annoying behavior that causes me to turn off all these "helpful" autocomplete things unless I request them by keystroke. No IDE should ever, ever, ever, turn correctly typed code into incorrect code. Ever.
legalize Posted - Jul 01 2014 : 5:54:02 PM
Like I said, I have it configured not to show any listboxes unless I request one with a keystroke. So if you're seeing listboxes, you're not reproducing my environment.
accord Posted - Jul 01 2014 : 5:12:17 PM
This is strange. I'm seeing a listbox after typing '.', so we may be experiencing a different problem?



When I press *, it is indeed completes as "c.Method3*", but when I remove the characters from the mentioned editbox I get "(c.*".

Does deleting the characters from the below editbox solves the problem?

Tools -> Options... -> Text Editor -> C/C++ -> Advanced -> Member List Commit Characters

I'm wondering whether are we seeing a different problem?
legalize Posted - Jul 01 2014 : 09:35:35 AM
It's still a bug.

Typing . did not complete anything, typing * introduced the invalid syntax.

No completion popup boxes were shown, the invalid "Method3" was simply inserted as soon as I typed the *.

Even if this was a proper attempt at completing some shown suggestion (again, no suggestions were shown because I turn off all that stuff unless I request it by keystroke), the resulting code is still invalid syntax.

No matter which way you slice it, there's a bug.
accord Posted - Jun 30 2014 : 6:15:13 PM
Thank you for taking the time to send your settings in. I have imported them I found the culprit.

Can you please go to the following editbox?

Tools -> Options... -> Text Editor -> C/C++ -> Advanced -> Member List Commit Characters

Here, '.' is in the editbox, hence the completion. The easiest way to solve this is deleting the content of this listbox and pressing OK. (to accept the change and close the Options dialog)

This happens because Visual Assist respects Intellisense settings so when users install Visual Assist, we can keep a similar listbox behavior. You have disabled Intellisense, but VA still uses the characters specified here.

quote:
disabling VAX and typing the code and then I get exactly what I typed.

This is true, this came from VA. Disabling solved the problem because Intellisense is disabled on this machine.

We try to avoid duplicating settings, especially since we want to keep a similar behaviour with or without VA. Since there are new settings added in new Visual Studios, we use more setting in newer Visual Studios. This was added in VS2013 if I recall correctly.
legalize Posted - Jun 30 2014 : 01:24:28 AM
Sent.
accord Posted - Jun 24 2014 : 10:33:21 PM
This is strange and should not happen. However, I wasn't able to reproduce the problem here.

Can you please export and send in your Visual Assist and Visual Studio settings?

1. VA Options -> Performance -> Export Settings

2. IDE tools menu -> Import and Export Settings -> Export selected environment settings

So I can import them here to see if I can reproduce the problem.

You can send the files in using the following form:
http://www.wholetomato.com/support/contact.asp

Please include the URL of this topic in the "your request" field.

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