Author |
Topic |
|
asmout
Ketchup Master
58 Posts |
Posted - Mar 05 2004 : 08:09:38 AM
|
I have just installed build 1219 (on VC6) and am happy to say that the Alt+G and "find next by context" functions are now much better. Hooray!
However, I have noticed during testing that the "find next by context" feature does not always manage to stay in context. To reproduce this bug, you need to have a reasonably large file (my one has ~1500 lines) in which the same variable name is reused as a local variable in several functions.
1) Click on one of the instances of this variable and select "find next by context" (toolbar or key binding, it matters not). If another instance exists in the current function, this will be highlighted immediately. 2) Now click "find next by context" until you highlight the the last instance of the variable in that particular function. 3) Click "find next by context" and wait. After a short pause (say ~ 2s), the message "Passed the end of the file" appears in the status bar, and the first instance of the variable in the function context is highlighted. So far so good (except for the rather lengthy pause). 4) Repeat steps 2&3, but this time click "find next by context" during the pause. This time VAX will leave the current context and highlight the variable in some other function.
Sadly "find previous" still does not work at all in 1219
|
|
asmout
Ketchup Master
58 Posts |
Posted - Mar 10 2004 : 04:15:28 AM
|
Can anyone else confirm this? |
|
|
Old as dirt
Tomato Guru
USA
246 Posts |
Posted - Mar 10 2004 : 07:43:06 AM
|
Find next works just fine for me, but I don't have but a few functions in each file. Find previous still doesn't work. |
Ken |
|
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Mar 10 2004 : 09:51:14 AM
|
I have a HRESULT called 'hr' that appears as a local variable in almost every function in this stupid 9500-line CPP file. Sorry, but 'Find Next by Context' works fine for me - can't make it fail doing what you describe. (And 'Find Previous by Context' doesn't work at all.)
|
|
|
asmout
Ketchup Master
58 Posts |
Posted - Mar 10 2004 : 8:16:33 PM
|
Thanks for trying, guys!
I guess I will have to look harder for the cause. I cannot replicate this behavior in a virgin project, but when I try and use it for real, it malfunctions for me all the time.
|
|
|
asmout
Ketchup Master
58 Posts |
Posted - Mar 10 2004 : 9:04:45 PM
|
Ok, I have now managed to replicate it in a virginal project:
1) Bind "find next By context" to ctrl+alt+right (using a key combination rather than the toolbar button may be important). I have not managed to reproduce the bug using the test below by just using the toolbar buttons.
2) Paste the following lines at the end of the MainFrm.cpp file of a default MFC appwizard project:
namespace {
void f1(
) {
CWnd wnd;
wnd.ShowWindow();
}
void f2(
) {
CWnd wnd;
wnd.ShowWindow();
}
void f3(
) {
CWnd wnd;
wnd.ShowWindow();
}
void f4(
) {
CWnd wnd;
wnd.ShowWindow();
}
}
3) left-click on the second wnd symbol in function f1 ("wnd.ShowWindow()")
4) hold down ctrl+alt, and tap the right arrow key twice in quick succession - A random wnd symbol (in f2, f3, or f4) is highlighted.
6) Repeat step 4, but much more slowly - Only wnd symbols in the current function are highlighted.
(Usual setup for me: VS6, 1219, W2k).
Interestingly, if I choose a different key binding, such as alt+N, I get a differeent bug:
3b) left-click on the second wnd symbol in function f1 ("wnd.ShowWindow()"), noting the caret position carefully.
4b) Hold down Alt and tap N twice in quick successtion - The system beeps, a dialog box appears with the message "Cannot find the string 'wnd'.", and the three characters before the caret position in 3b are highlighted.
I have also seen this type of behavior in my regular usage of find next by context.
Weird.
|
|
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Mar 11 2004 : 09:53:02 AM
|
Yup, it fails exactly as you describe for me on WinXP, 1219, VC6. Even the stuff in step (4b) fails the same for me, including the "three characters before the caret position" part. I think the important part is binding it to Ctrl-Alt-RightArrow; using the toolbar icon never fails for me. Also important is the speed at which you issue the keystrokes; it only fails when I do them as quickly as I can.
|
|
|
asmout
Ketchup Master
58 Posts |
Posted - Mar 31 2004 : 5:58:24 PM
|
Still a bug in 1223. Very annoying! Using the toolbar buttons for this feature is _so_ cumbersome. Looks like I am stuck with ctrl+f3 (although limited, at least it works). |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 21 2004 : 10:55:11 AM
|
Will be fixed in 1231 |
Whole Tomato Software, Inc. |
|
|
|
Topic |
|