Author |
Topic |
|
znakeeye
Tomato Guru
379 Posts |
Posted - Jul 07 2009 : 03:36:12 AM
|
VAX 1649, VS2008 SP1.
In MFC classes are often prefixed with a 'C', but the header-file is not: // MyClass.h class CMyClass {};
Quite often I copy the class name to make an #include:
Ctrl+V, Ctrl+left, #include " yields #include "CMyClass|" (CMyClass selected)
Q1: Why is the text selected? Q2: Would it be possible for VAX to auto-remove the C-prefix?
First look for "CMyClass.h". If not found, look for "MyClass.h". If found, remove mistyped 'C'. |
|
GennadiyKorol
Ketchup Master
Israel
54 Posts |
Posted - Jul 07 2009 : 10:12:47 AM
|
Shouldn't VAX work with the actual files where the symbol was defined and not just symbols name? |
Correctness might be a theoretical concept but incorrectness has practical implications. |
|
|
feline
Whole Tomato Software
United Kingdom
18958 Posts |
Posted - Jul 07 2009 : 11:53:53 AM
|
In VA 1727 just use the new refactoring command "Add Include", which adds the #include statement for you.
znakeeye I have no idea why CMyClass is selected, I have just tried the same steps here and it is not selected for me. |
zen is the art of being at one with the two'ness |
|
|
znakeeye
Tomato Guru
379 Posts |
Posted - Jul 07 2009 : 6:43:12 PM
|
Yeah, will try the new feature as soon as my boss renews our licenses...
Regarding the selection of "CMyClass". Could it be this registry-setting where you tell VAX to select the first item in the dropdown?
|CMyClass #include "CMyClass|"
The text gets selected :(. 100% reproducible. |
|
|
feline
Whole Tomato Software
United Kingdom
18958 Posts |
Posted - Jul 08 2009 : 10:25:50 AM
|
A listbox should never be accepted without some form of interaction. You need to press some key or use the mouse to accept a listbox, or else you are using a modified VA Snippet for #include that is inserting the clipboard directly. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|