Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Autocompletion overriding my manually typed choice

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
scottbilas Posted - Apr 02 2010 : 12:04:42 PM
I've been running into this problem a lot and finally nailed down a solid repro case. This is with 1814 in VS2008.

The problem is that I type in a symbol fully yet because an autocompletion dropdown came down, and had something else selected, it chooses that when I hit Space and overrides what I typed in.

Repro:

1. Create a new WPF project.
2. Add a new class with this as its contents:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;

namespace WpfApplication3
{
	class Class1 : Panel
	{
		void Blah()
		{

		}
	}
}


3. In the Blah() function type "va"
4. This should bring up a dropdown that has ValidateValueCallback at its top.
5. Type 'r' then hit Space immediately after

What happens is that what should be "var" ends up as "ValidateValueCallback".

This only happens if you pause after typing the "va" just long enough to let the dropdown happen. As I type this happens to me all the time.

What should happen instead is that VAX should recognize that "var" is a keyword and err on the side of not messing up my code, unless I specifically arrow-down to select something else.
17   L A T E S T    R E P L I E S    (Newest First)
support Posted - May 10 2010 : 9:02:04 PM
case=43501 is fixed in build 1823
sean Posted - May 06 2010 : 9:52:03 PM
We opened case=43501 for this report.
scottbilas Posted - Apr 28 2010 : 1:24:56 PM
Well, it masks the problem. Because 'space' no longer brings up the dialog, there's no longer an issue with me typing too fast and ending up with 'in' instead of 'if' or any of the other examples I gave.

Autocompletion happens for me with '.' and 'tab'. In either case I am a lot more deliberate in choosing something from the box, which slows down enough that there is time for the completion box to react.

So I believe the problem is still there, I just no longer see it.
feline Posted - Apr 28 2010 : 11:53:11 AM
Does this fix the problem, or are you still seeing the problem at times?
scottbilas Posted - Apr 27 2010 : 3:58:37 PM
This does help with the problem, yes.
feline Posted - Apr 23 2010 : 4:18:20 PM
Do you have:

IDE tools menu -> Options -> Text Editor -> C# -> IntelliSense -> Committed by pressing the space bar

turned On or Off? I am wondering if turning this off will help.
scottbilas Posted - Apr 22 2010 : 2:52:32 PM
Another incidence: typing "public string " ended up as "public sbyte ". I don't think I've ever even used an sbyte in this setup so it's weird that this would take precedence over string, which I use all the time.
scottbilas Posted - Apr 21 2010 : 11:14:31 PM
I'm using my laptop which is a much slower machine (though still fast) and it's happening a lot more often here (my VAssist settings and the rest of my environment are the same btw).

I have a pretty good repro case I think.

I'm typing this:

foreach (var item in

It's all around the "in". First time I typed it I got "if". If I backspace twice then type "in" again I get "if" again. This happens a few times, then the "in" sticks. So then I switch to trying to type "if" and it keeps replacing it with "in". One time I got "namespace". Note that it's important to type fast and hit space immediately after the keyword. If you pause before hitting space, it will not repro.

Here's my guess as to what is going on. When I type that first "i" the autocomplete dialog starts to spin up. First thing that matches is the most recently used word that starts with "i". Yet when I type the second letter and then space quickly, it skips over the second match to find the correct keyword, and considers the space to be the "accept this" command.

This is one of the most frustrating things about VAssist for me right now. I am constantly having to undo things or pause and wait for something to finish, or hit ESC to make something go away. It's making me question how much productivity gain I'm getting from VAssist, honestly (and I've been using this product since the late 90's).
scottbilas Posted - Apr 21 2010 : 7:55:02 PM
This is still happening in VS2010 with the latest build. I can't pin down exactly what the repro is, but it is happening often as I'm typing quickly.

For example, just now I typed '= null;' and VAssist turned that into '= namespace;'. But if I undo it and type in the exact same thing again, it doesn't do it. Seems to only happen one time.

I've gotten this to happen with other keywords as well.

In my Suggestions options, I only have "Include suggestions in listboxes" checked. Not that it should matter - if I'm typing in a keyword and I hit ; it should not replace that keyword with anything else.
scottbilas Posted - Apr 17 2010 : 1:36:20 PM
I'm no longer able to reproduce the issue, though I recently upgraded to a much faster computer. Could have something to do with it. But I am seeing 'var' when I type V regardless of any settings in the Vassist suggestion options (which is what I'd expect, given that it's a keyword not a symbol). I'll post back if I run into the issue again.
feline Posted - Apr 16 2010 : 6:24:46 PM
This registry key setting might interest you:

http://docs.wholetomato.com?W357

But when I tested and reproduced this I was seeing a list of VA suggestions that did not include "var". Are you actually seeing a reliable listbox appear with "var" that is then "lost" and replaced with a different listbox without "var" in it when you type the "r" at the end of "var"?
scottbilas Posted - Apr 15 2010 : 4:00:13 PM
My original problem was less about the contents of the listbox than it was about the bad behavior. If I type "va" then hit "r" then space quickly, I didn't get "var", but instead something entirely different. I'd expect that if what I type exactly matches something in the box, it will get preferred over any of the other items in the auto completion.
feline Posted - Apr 15 2010 : 3:34:49 PM
I am not quite sure what to say here. VA seems to be behaving as expected in this situation.

VA suggestions are just a limited set of "best guesses", that are based on situation, typing history, etc. But since this is just a guess it can never be 100% perfect. The idea is to give you a small number of focussed suggestions, not a list of all possible symbols and keywords.
scottbilas Posted - Apr 13 2010 : 5:36:12 PM
Yes, disabling that option fixes the issue. That new option sure seems to cause a lot of problems. :)
feline Posted - Apr 06 2010 : 2:08:32 PM
For the first code sample I am seeing the same problem, thank you for the very clear description. For me turning Off the new VA option:

VA Options -> Advanced -> Suggestions -> Filter completion lists to use VA's Suggestions in C#, VB,...

helps quite a lot. With this option turned on the listbox is being filtered down so you are only seeing VA's suggestions, but VA is only suggesting a few symbol names that it knows and thinks you might be after. As a result suggestions can be very good at sometimes, and not so good at other times.

Does turning off this option also help with the second problem you are seeing?
scottbilas Posted - Apr 02 2010 : 12:44:42 PM
Oops - in my second example above it is not valid code. The only thing that can go after tvm.Parent is 'into', so typing 'select' isn't valid.

Regardless - what should go into that listbox? Not a bunch of types..just 'into', right?
scottbilas Posted - Apr 02 2010 : 12:37:32 PM
This happens in an even worse situation, where it has nothing to do with how fast I'm typing.

I attached a screen shot. As soon as I hit Space it replaces 'select' with SelectionChangedEventArgs. This is wrong for two big reasons:

1. select is a valid keyword

2. It makes no sense in the given context in the linq query to have any of those listed in the dropdown box. The linq grammar is fairly simple and there are few keywords permitted in this spot in the expression.

#1 is the big problem. #2 would be a nice to have to fix.

I am finding with VAX lately that it's doing this kind of thing in many situations and I frequently have to hit ESC every other symbol that I type to make the autocompletion box go away.





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