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
 1609: completion listbox and (
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 29 2007 :  2:29:30 PM  Show Profile  Reply with Quote
(file.h)
class cSomeClass {
    float GetSectionGain();
};

when I want to Add a new member function to this class

(file.cpp)
float cSomeClass::GetGain|

VAX will offer me GetSectionGain (which is normal), but when I press '(', VAX will accepts this suggestion, and replaces my function name. When I add new function to a class, these type of completion listboxes will be allways invalid, so '(' should not commit the selection of the listbox.
"Selection committed with / any character not valid in a symbol" checkbox is NOT checked, so only enter or tab should accept any type of completion or suggestion listbox.

Edited by - accord on Sep 29 2007 5:08:01 PM

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 01 2007 :  4:45:39 PM  Show Profile  Reply with Quote
Disable VA and you will see the same behaviour. Once you have triggered a member listbox (double colon, dot, arrow) then the IDE believes that brackets should accept the current item. VA is doing the same thing so that we are consistent with the IDE.

In this case the suggestion listbox options do not apply, since you are not seeing a suggestion listbox.

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 01 2007 :  5:54:30 PM  Show Profile  Reply with Quote
This option is generally for listboxes, and not only for suggestion listboxes. Suggestion listboxes has it's own "tab" in options dialog. I you are typing fast, and don't mind about the listbox, VAX (and yes, the IDE also) will simply overwrite my text.

This is a new design decision to behave same as VS. But I have used Visual Assist for a while and back to IDE's behavior is a bit confusing.

What about to make an option in ListBoxes tab:
"Visual Studio compatible mode"
or
"Visual Assist mode"

Under Visual Assist mode you can make some little changes to the listbox behavior and maybe some option to configure the behavior as well.
(For example the 15xx behavior was more polished then the IDE's default behavior (in my opinion))

What do you think?

Edited by - accord on Oct 01 2007 6:23:13 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 01 2007 :  6:36:57 PM  Show Profile  Reply with Quote
Which version of VA were you using before? I have just tested this in VA 1301 (quite a way back) and it behaves the same.

With the new refactoring features there is a case to be made for an option to control this.

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 02 2007 :  05:39:33 AM  Show Profile  Reply with Quote
Strange. I was the same in 1559?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 02 2007 :  1:29:33 PM  Show Profile  Reply with Quote
I have just checked VA 1557 and 1559, using the test:

    std::string strName;
    strName.len|


Typing '(' accepts "length" which is the current item in the list.

Does this seem to be a fair test? If you are seeing a change in behaviour then we need to try to get to the bottom of that.

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 14 2007 :  5:40:04 PM  Show Profile  Reply with Quote
quote:
from feline
http://forum.wholetomato.com/forum/topic.asp?whichpage=1&TOPIC_ID=7055#28276
The logic here seems to be that the listbox must be correct, so you obviously want to accept the current item.



When I read the quoted thread, I have thought about this problem, and I found that the solution is obvious in my case:
If I am writing outside a function body the completion listbox should NOT occur after "::"! Let's see my previous example:
quote:

(file.h)

class cSomeClass {
float GetSectionGain();
};


when I want to Add a new member function to this class

(file.cpp)

float cSomeClass::GetGain|


VAX will offer me GetSectionGain (which is normal), but when I press '(', VAX will accepts this suggestion, and replaces my function name.


Feline: the quoted truth is not really valid in this case.

What do you think?

(..and of course: from this point of view, my sentence "VAX will offer me GetSectionGain (which is normal)" was NOT proper )

Edited by - accord on Dec 14 2007 6:30:46 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Dec 15 2007 :  07:56:48 AM  Show Profile  Reply with Quote
What happens when you are creating the function implementation by hand? Before VA offered refactoring this was something I used to do a lot, and I liked having a listbox at this point.

What if you are adding a new overload to an existing function? Having VA suggest the function name and parameter list can be a good thing, since you can then edit them, rather than typing them from scratch.

Personally I feel there are good reasons for VA offering you a listbox here, but how the listbox should be accepted is a slightly different question

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 15 2007 :  09:39:35 AM  Show Profile  Reply with Quote
quote:
What happens when you are creating the function implementation by hand? Before VA offered refactoring this was something I used to do a lot, and I liked having a listbox at this point.

Sometimes I am doing this. But mostly I am write the implementation, and when I done, I use create declaration. Sometimes this is much better than crosswise.

quote:
but how the listbox should be accepted is a slightly different question

I think accepting listbox by '(' is NOT reasonable in this case (at least when any character not valid in a symbol is NOT checked). If you will agree, I will be happy.

quote:
What if you are adding a new overload to an existing function?

It is very rare situation compare to adding non-overload functions.
But still you can use CTRL+C, CTRL+V , or you can accept the suggestion by Enter or TAB or even by '(' if you checked the "any character not valid in a symbol")

Edited by - accord on Dec 15 2007 09:47:55 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Dec 15 2007 :  11:20:50 AM  Show Profile  Reply with Quote
I agree about the listbox being accepted with '(', which should be covered by:

case=9369

which says the VA options should apply to all listboxes.

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 15 2007 :  12:23:28 PM  Show Profile  Reply with Quote
Great!
I didn't know about case=9369, but this is good news
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jun 12 2009 :  10:10:55 PM  Show Profile  Reply with Quote
Build 1727 has support for disabling the default "complete on any character not valid" behavior of C/C++ members lists. It does not have a UI element in the VA Options dialog though.

To disable the default behavior, exit all instances of Visual Studio and add a new registry value:
HKEY_CURRENT_USER\\Software\\Whole Tomato\\Visual Assist X
string value named: MembersExpandOnAny
value: No

Changing the default behavior should only affect the C/C++ experience and is dependent upon the VA listbox "committed with any character not valid in a symbol" option being unchecked (otherwise the MembersExpandOnAny value is ignored).

(But you already knew this accord, didn't you?)
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Aug 04 2010 :  5:41:55 PM  Show Profile  Reply with Quote
"Selections committed with" behavior for member lists is now configurable under VA Options | Advanced | Listboxes. (case=9369), implemented in build 1829.

Whole Tomato Software, Inc.
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