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
 Feature Requests
 Don't replace the current symbol if...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Aug 17 2016 :  10:17:44 AM  Show Profile  Reply with Quote
Don't replace the current symbol if the accepted suggested symbol is a namespace qualifier -

MyFun(arg1, arg2);

^ VS 2013 underlines MyFun as "no symbol in scope" - and I put my karet in front, and start typing Toolbox:: - which VA senses is "Toolbox" by the time I hit about 3 chars - so I accept it, but then it erases / replaces "MyFun":

Toolbox(arg1, arg2);

Which is now an unknown / illegal symbol.

Stupid / annoying.

It should do:

Toolbox::MyFun(arg1, arg2);

Since Toolbox is a namespace, and cannot possibly be a replacement for MyFun.

Even if "My Fun" is wrong somehow, the next thing I type after inserting Toolbox:: is definitely going to be SOMETHING - not nothing - and Toolbox:: cannot possibly stand on its own (unless this is a using expressing - or maybe a typedef - but those situations don't arise as this one does where I'm trying to insert a keyword qualifier and VA insists on destroying the symbol following it)

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 18 2016 :  9:26:29 PM  Show Profile  Reply with Quote
I tried to reproduce the problem using the below simple example, but it worked out for me:



Can you please try if you can reproduce using the below code?


namespace qqq
{
	void MyFun(int a, int b) {}
}

void func()
{
	int arg1, arg2;
	qqq::MyFun(1, 2);
}


I'm only able to reproduce the problem using member listboxes. (i.e. after a . or ->)

Edited by - accord on Aug 18 2016 9:28:57 PM
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Aug 19 2016 :  11:21:19 AM  Show Profile  Reply with Quote
huh! I wish it would work as you describe.
I'll try to see if I can find some boundaries to "when it doesn't work" (afaict - that's currently "always" - but maybe I overlooked some context...).

NOTE: I am almost always working in a class-member:

void MyClass::Member()
{
MyFun(1,2);
}

I wonder if that makes a diff?

---

EDIT: I was unable to get it to fail using my description of the issue, but now I'm having constant issues again.

It may be a VS issue, and nothing to do with VA.

If I have any text - doesn't need to be unknown symbol just anything:

void fun()
{
throw exception(get_error());
}

and I decide to change get_error() to a FormatString("blah %s", get_error()) or similar, I put my mouse & insertion point in front of get_error, start typing Format - which the suggestion for FormatString appears, I select that - and get_error is blown away - I now only have FormatString...

throw exception(FormatString());

but it should have been:

throw exception(FormatString^get_error());

Where ^ is my cursor position (not an actual char).

... so another VS idiocy, and not really a VA issue?

This sort of thing happens constantly - start placing some needed word in front of an existing word, accept suggestion, and have existing word replaced.

If I first add a space, then do the typing & accept the suggestion, then I get closer to what I want - my new word + old - but with a space between - the extra effort to create that, and extra to get rid of the space later on.

I'm not sure at this point why my initial description / scenario is wrong - that context works - or how it is different than what I'm describing now other than this isn't a response to an unknown symbol - just typing one symbol in front of the other - but having the suggestion replace instead of insert...?

Edited by - Mordachai on Aug 19 2016 3:57:49 PM
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Aug 19 2016 :  4:08:16 PM  Show Profile  Reply with Quote
Just to confirm - it seems to be that the symbol must be known for this to be a problem.

VA or VS are "smart" enough to notice that any unknown symbol should not be replaced.
But are "dumb" enough to replace any known symbol when I'm typing a new symbol in front and accept a suggestion.

It totally hinges on whether the symbol I'm trying to insert in front of is "known" or not. :'(
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 19 2016 :  11:56:17 PM  Show Profile  Reply with Quote
You can find out if a behaviour is coming from VA or VS by temporarily disabling Visual Assist:
VAssistX -> Enable/Disable Visual Assist

We're making changes in the next build regarding this, hopefully they will help!

Does turning off this feature completely results in what you want?
https://docs.wholetomato.com/default.asp?W640

Edited by - accord on Aug 19 2016 11:58:00 PM
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