Author |
Topic |
|
DrB
Senior Member
28 Posts |
Posted - Apr 17 2008 : 11:26:25 AM
|
When VAX insists on changing a variable name, what is the easiest way to undo the change?
Example: I have a C++ class (in VS 2008) with a void* member named "handle". Now when I write a line of code that starts like:
my_function(handle,
VAX changed "handle" to "HANDLE" (which is a pain, shouldn't it prefer a more local variable, or better yet prefer the proper case?). So, I try hitting "ctrl-z" to undo the variable change, but this removes the comma. When I put the comma back, VAX changes it back to "HANDLE" again.
How can I get over a speed bump like that quickly? |
|
rhummer
Tomato Guru
USA
527 Posts |
Posted - Apr 17 2008 : 11:44:04 AM
|
What version of VA X are you using? I believe this is improved in 163,2 which is in beta. But that is the 'Repair case' option, you can turn that off in the VA X Options -> Advanced -> Correction. |
Tools Engineer - Raven Software VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64
|
|
|
DrB
Senior Member
28 Posts |
Posted - Apr 17 2008 : 12:02:46 PM
|
Sorry, I should have said. I am using Visual Studio 2008, and Visual Assist 10.4.1632.0.
I would not want to turn off "Repair Case"; I am wondering if there is a key stroke to tell VAX to back off when I want to override it.
Thanks |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Apr 17 2008 : 4:34:44 PM
|
I am seeing the same effect here.
When you type "handle" as a parameter, you should see a suggestion listbox rather than completion listbox. As far as I know, selections should NOT accepted in suggestion listbox if you keep unchecked
Visual Assist Options... / Advanced / Listboxes / Selections commited with: Any character not valid in a symbol
Strange: even if I start typing into a new line in a function body, my selection is accepted by space or comma. (Any character not valid in a symbol is unchecked).
So I think it is a regression in 1632. If Feline will confirm this, he can put in a bug report if it is not fixed already behind the scenes. |
Edited by - accord on Apr 17 2008 4:48:57 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Apr 18 2008 : 09:44:16 AM
|
So far I cannot reproduce the problem. I wonder if I am doing something different to everyone else. I am using the following code:
static void testCallWithPointer(void *pParam1, int nParam2) { }
static void testGeneralCode()
{
void *handle = 0;
testCallWithPointer(handle, 0); // testing typing this line
}
As I type the function call I see a suggestion listbox as I am typing the parameter "handle". Are people typing the entire word, or accepting the listbox? I am typing the entire word "handle". When I type the final letter the listbox closes. When I type the comma "handle" is left alone, the comma is typed, nothing else happens.
I have repair case turned On.
For reference this is what I am seeing, as I am typing the parameter "handle":
|
zen is the art of being at one with the two'ness |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Apr 18 2008 : 5:14:01 PM
|
Sorry, my mistake, I haven't declared "void* handle", therefore "HANDLE" was my default selection, and the correction was made by "Repair case" option.
So we have to figure out why "HANDLE" is the default selection in your listbox, even if you declare "handle". In Feline's example "void* handle" was declared in local scope, but I do not see any problems even if declare "void* handle" as a member.
Do you see "handle" (with lower case) also in your listbox next to "HANDLE"? (which is your default selection) There may be something in you source code that confuse VAX parser. Can you try this handle stuff in a new, empty test project with a very simple class? |
Edited by - accord on Apr 18 2008 6:02:30 PM |
|
|
|
Topic |
|