Author |
Topic |
|
tom_seddon
Tomato Guru
162 Posts |
Posted - Aug 24 2005 : 07:06:06 AM
|
To reproduce:
1. Start VS.NET 2003 2. Create new C++ file 3. Enter code:
struct Test
{
float x,y,z;
static float X,Y,Z;
};
int main()
{
Test t;
t
}
4. Put cursor after the "t", then press ".". Note completion popup with X, x, Y, y, Z and z.
5. Note that typing "x" or "y" takes one to the lower-case "x" or "y", but pressing "z" takes one to the upper-case "Z".
After playing around further, you will notice some other oddities. (Well, I hope you will -- I certainly did.) Editing the structure -- changing X, Y and Z to XX, YY, ZZ, for example -- changes the order that VAX picks items from the list, but not the order that they are displayed. More egregiously, if you have VAX set not to enter symbols on entering a char not valid in a symbol, it will actually go ahead and do that -- very annoying if the next character was going to be ";".
(The real code is not exactly like this, of course, but it has "x", "y" and "z" in the structure, and some static const members beginning with "X", "Y" and "Z".) |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Aug 24 2005 : 3:17:06 PM
|
i am getting a slightly different effect for the first case. for me 'x' and 'z' both jump to upper case letters while 'y' jumps to a lower case letter.
following some experimentation with a decent sized class it seems that case is basically ignored on completion listboxes (no question mark). instead the item you jump to is related to the item i would expect a suggestion listbox to suggest, so VAX is guessing what you are going to type.
i agree, it definitely looks odd, but i think this particular bit is a feature rather than a bug.
i am more concerned by your second point. am i reading this correctly, VAX is selecting and inserting the wrong item when you type semi-colon? i have tried this several times over with the code:
struct Test
{
float x,y,z;
static float XX,YY,ZZ;
};
typing semi-colon is never selecting anything for me. can you tell me what you are doing so i can make sure i am doing the same?
this is with VS 2003 and VAX 1418. |
zen is the art of being at one with the two'ness |
|
|
tom_seddon
Tomato Guru
162 Posts |
Posted - Aug 25 2005 : 10:42:23 AM
|
I'm doing basically what you say. Whichever entry is selected first (so I can select "XX" by typing "X" rather than "x", and it still happens) gets entered when you type a character not valid in a symbol. If I change to a different entry, by using the arrow keys, this no longer happens.
I have "accept suggestions with Enter" switched off, and pressing Enter sure enough doesn't enter the item. I have "accept suggestions with any char not valid in a symbol" switched off, which is why its behaviour surprises me. |
|
|
tom_seddon
Tomato Guru
162 Posts |
Posted - Aug 25 2005 : 10:59:13 AM
|
Oops -- forgot to say. VAX 1418 and VS.NET 2003.
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Aug 25 2005 : 4:04:30 PM
|
all right, just to make sure that i am not missing something basic here the steps i tried are:
* load VS 2003 with VAX 1418 installed * open a test C++ project * create a new unnamed cpp file, and do not save it * copy in your sample code * change the static variables line to read "static float XX,YY,ZZ;" * after "t" type ".x;", the list box was showing "x" and this worked correctly * delete this and after "t" type ".y;", the list box was showing "y" and this worked correctly * delete this and after "t" type ".z;", the list box was showing "z" and this worked correctly
so next i changed the static variables back to their original form. now when i type i am seeing something go wrong.
when i type "t.x" the selected suggestion is "X". i ignore this and type semi-colon, and i end up with "t.X;"
for "y" the selected suggestion is "y" so i end up with "t.y;"
for "z" the selected suggestion is "Z" and i end up with "t.Z;"
this is happening with VAX settings: VA Options -> text editor -> suggestions -> display suggestion list and accept with: tab = on enter = off any character not valid in a symbol = off
VA Options -> text editor -> correction -> repair case = off
this does not seem to be quite what you are getting, but it does seem to be a bug.
case=723
i have tried this on a second machine and i got upper case X, Y and Z inserted, so wrong all 3 times. i still cannot get it to go wrong with the XX, YY and ZZ variables though. |
zen is the art of being at one with the two'ness |
|
|
tom_seddon
Tomato Guru
162 Posts |
Posted - Aug 31 2005 : 10:56:08 AM
|
Yes, sounds like you are getting the same behaviour as me.
I suspect that in the cases where it appears to be correct, it is actually wrong, and we are getting the suggestion rather than what was typed -- it just happens that these are the same thing. One for the philosophers, perhaps. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Aug 31 2005 : 4:52:07 PM
|
it is good to know i have caught the problem you were having. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|
|
|