Author |
Topic |
|
code42
Junior Member
20 Posts |
Posted - Jan 17 2007 : 1:53:22 PM
|
Suggestions pop up as you type, but if you type in a known symbol, it seems like the suggestions dissapear. If I have a variable 'timeEstimate', and I type in 'time', the suggestions go away because time is a valid symbol. This seems to happen too often, it would be nice to only hide the suggestions if the only suggestion is what is already typed.
What do you think? |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 18 2007 : 09:58:38 AM
|
What happens when I want to type:
time m_start
where the type and variable are separated by a tab character? This is why suggestions behave as you describe, since VA does not know that you are not trying to type a known type or keyword. |
zen is the art of being at one with the two'ness |
|
|
code42
Junior Member
20 Posts |
Posted - Jan 24 2007 : 11:05:37 AM
|
Well, since 'time' would match 'time' in the list, pressing tab would close the suggestion box, leaving the text unchanged. Then if you want a tab, you can tab over. That way I can type 'time' and still see the closest matches. Guess I dont really see the issue. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 24 2007 : 11:29:04 AM
|
If "time" is selected in the list then what you describe is quite correct. I have just typed in the following code, using VS2005, VA 1544 and C++
static void testSuggest()
{
time timeStart;
time timeEnd;
tim|
}
and I am seeing:
if the suggestion listbox stays there when I type 'e' then the current item is likely to still be "timeEnd", since this is VA's best guess, since this is what I last typed.
By disappearing the lists try to be as helpful as possible without actually getting in the way. |
zen is the art of being at one with the two'ness |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Jan 28 2007 : 4:46:52 PM
|
I agree with code42. The problem is, this behaviour is getting in the way if you see disappearing the list but you do not want this. I never use tab in my code and I never use tab to accept suggestions.
This problem can be resolved if you put a new registry item into the registry to control the behaviour. The default setting should be the current working. Customizing is always a great thing. |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Jan 28 2007 : 4:53:46 PM
|
An even better solution can be if VAX select "time" instead of closing suggestion list in your example. What do you think? |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 29 2007 : 08:42:49 AM
|
If we added an option every time someone disagreed with the default behaviour we would probably have thousands, if not hundreds of thousands of options by now
As for VA selecting "time" in my screen shot, why would VA select "time"? The most recently typed word was "timeEnd", so this is a sensible guess for the word I am currently typing. Can you explain why VA should prefer a data type over a local variable name inside a function? Based on my code I am far more likely to type a variable name than a type name.
You may never use tab in your code, but a lot of people do. What about people who have turned on:
VA Options -> Text Editor -> suggestions -> display suggestion list and accept with: Any character not valid in a symbol
VA is not perfect, but working in support really teaches me that different people work very differently, so we have to try and consider the fall out from even "simple" and "save" changes, since they can upset any number of people. |
zen is the art of being at one with the two'ness |
|
|
mwb1100
Ketchup Master
82 Posts |
Posted - Jan 29 2007 : 4:26:06 PM
|
quote: Originally posted by feline
As for VA selecting "time" in my screen shot, why would VA select "time"?
For the same reason that the suggestion box goes away altogether right now?
|
|
|
sl@sh
Tomato Guru
Switzerland
204 Posts |
Posted - Jan 30 2007 : 03:26:03 AM
|
I don't know why it's a good thing for the listbox going away in the first place, it doesn't save any work for the developer. If indeed in your example "time" is the word the user wanted to type, then the next character typed will make the suggestion listbox disappear anyway!
I suggest that the listbox should stay unless there is no valid completion left. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 30 2007 : 07:34:26 AM
|
mwb1100 I don't understand what you are getting at. A suggestion listbox is basically a "best guess", and nothing more. A lot of the time VA's best guess is not going to be a type, but you may be entering a type. Changing the rules to always suggest types first, regardless of VA's best guess seems to rather defeat the point of suggestion listboxes.
Let us assume for the moment that the suggestion listbox did not disapear, and I typed time. Based on the screen shot I posted the suggested item is still timeEnd.
If I am trying to type the line:
time timeMiddle;
with a tab, or even several spaces between time and timeMiddle what happens?
As soon as I press the tab then "timeEnd" will be selected and inserted, which is wrong. True I could turn off accepting with tab, but I am used to this. Alternatively I could switch to accepting with Enter, but this still causes me problems if I am trying to type "time" followed by a new line.
Of course "Space" will be fine, unless I have turned on:
VA Options -> Text Editor -> suggestions -> display suggestion list and accept with: Any character not valid in a symbol
Does this make sense so far?
Keeping the suggestion listbox visible is fine some of the time, but it will change how you have to work, causing a lot more pressing of the Escape key in certain circumstances.
With the current system, which is not perfect, you only have to type one more letter and the suggestion listbox will reappear, since it is now clear you are not typing "time". If you want to be clever you can always use:
VA Options -> Text Editor -> listboxes -> allow acronyms VA Options -> Text Editor -> listboxes -> allow shorthand
and then just type "tien" to jump to the suggestion "timeEnd", bypassing "time" completely.
I understand that people are saying "make it better", and I believe in making VA better, but we don't want to make it "worse" for people who are not used to VA, and who find suggestion listboxes to be "odd" or even "in the way".
And yes, I am trying to avoid putting in a feature request for another option |
zen is the art of being at one with the two'ness |
|
|
sl@sh
Tomato Guru
Switzerland
204 Posts |
Posted - Jan 30 2007 : 08:52:51 AM
|
Ok, I understand why it does make sense for the listbox to disappear when you *want* to type 'time'. It wouldn't be any different though if you went with the suggestion offered before: just switch your best guess to 'time' at that point. Once you type more letters that are part of a symbol the best guess could switch back to 'timeEnd'. Or if the next character is a whitespace or other non-symbol character just close the listbox.
This wouldn't require an option, and it wouldn't make VA X any worse for any case I can think of. Can you? |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 30 2007 : 2:05:41 PM
|
*ah* I see what you mean now.
So the question becomes what does Tab and Enter now do when I have typed "time"? Currently pressing Tab with a suggestion listbox open accepts the suggestion, and does not insert any white space. The same applies to Enter.
Under the current behaviour when I type "time" the suggestion listbox disappears, and I can simply press Tab, Space, or anything else, and it is typed into the code. But with this change I loose that ability. To enter "time" followed by a tab character I have to press Tab twice, once to dismiss the suggestion listbox and once to enter the Tab.
The alternative is to have Tab behave differently when a known type name is highlighted in a suggestion listbox, but I really dislike this idea since it destroys consistency. Exactly the same key press on exactly the same type of listbox behaves differently depending on the currently situation...
I hope I don't sound like I am being difficult for the sake of it, I am starting to feel like I might. Personally I rather like this idea, but I am also bothered by the consequences of this change. After all, I am the one everyone will complain to |
zen is the art of being at one with the two'ness |
|
|
mwb1100
Ketchup Master
82 Posts |
Posted - Jan 30 2007 : 8:39:09 PM
|
quote: Originally posted by feline
The alternative is to have Tab behave differently when a known type name is highlighted in a suggestion listbox, but I really dislike this idea since it destroys consistency.
This is an inconsistency that I for one would appreciate. I would prefer to think of it as 'making the suggestions act intelligently'. I understand your concerns, however.
One small thing - you say that this behavior should happen "when a known type name is highlighted" - I think this behavior should apply to any symbol in the suggestion list (variables, functions, etc.), not just for types. As long as what I've typed so far exactly matches a symbol in the suggestion list.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Feb 04 2007 : 08:42:42 AM
|
Based on a quick test here suggestions do disappear once you have typed in a known function. This makes sense and fits with my experience.
The main problem with this "making the suggestions act intelligently" is that it is only intelligent if you understand the rules. Without understanding why they are doing this the suggestions "get in the way" and act inconsistently. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|