Author |
Topic |
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Oct 01 2005 : 10:15:21 PM
|
Goto jumps to the wrong location when the destination is in a collapsed section. |
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 03 2005 : 2:14:46 PM
|
what is your code like? i cannot reproduce this using VA 1424, VS 2003 and C++
test 1:
namespace felineNamespace
{
static int getChocolateCount() { return 3; }
static int getCakeCount() { return 2; }
}
static void foodCount()
{
printf("total count = %d\\n", felineNamespace::getChocolateCount() + felineNamespace::getCakeCount())
}
i collapsed the namespace and then jumped to "getChocolateCount()". the namespace is expanded, and the caret moves to the function.
test 2 - i collapsed the entire class in a header file, and then jumped to the .h by doing alt-g on a class member function in a cpp file and selecting the .h from the list. after changing to the header file the fold is successfully opened. |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Oct 03 2005 : 3:30:29 PM
|
Happens for me in .cpp files where many sections are collapsed (if, while, {}, etc.) no only whole classes or functions. |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 03 2005 : 3:44:26 PM
|
so you mean sections within sections are collapsed? my code does not tend to have functions or classes inside other structures, so i am not having any success reproducing this.
say you are jumping to function foo()
is foo() collapsed, and also inside something that is collapsed? how many collapses are you using? |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Oct 03 2005 : 3:52:09 PM
|
Well, since you can collapse on any context boundary (usually every opening curly bracket) it makes large functions much easier to handle. So i have often (specially during debugging) sections which are seldom used, or that i am not interested in, collapsed. |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 04 2005 : 3:01:26 PM
|
i tried this. however i cannot get alt_g jump into the middle of a function. am i missing something obvious here?
i can get a namespace holding lots of functions, but the namespace is only one fold to open, and then the function which i am jumping to is visible. |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Oct 04 2005 : 6:00:53 PM
|
try it with local variables, structures, etc. I'll try to get a postable repro case. |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Oct 07 2005 : 09:25:56 AM
|
I think I found the reason for what I've seen. Sometimes VA does not know where a symbol is defined (for whatever reason, because it is in scope and visible) so it tries to jump to the first USE of the symbol. So the bug is not the jump itself but the resolution of the symbol. |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 07 2005 : 6:00:49 PM
|
interesting. what happens if you do alt_g a second time? do you stay on the same line, or jump to the definition?
also what does next and previous in scope do? |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Oct 07 2005 : 6:05:06 PM
|
It stays at the same line. never tried next/previous in scope (really, whats that function for?) |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 07 2005 : 6:26:42 PM
|
i find it useful for finding all of the places where i have used a variable name inside a function. i don't use it often, but it is useful when i want it.
do you have local variables in bold turned on? if so, is this shown in bold? any chance of a copy of a file that does this, and the variable you are seeing this with? |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Oct 07 2005 : 6:30:36 PM
|
Ctrl+F3 does the same for me
Local vars in bold is off (dont like it and my naming scheme does not require it). I've seen it in various files, so i think its not related to the file. |
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Oct 07 2005 : 6:33:24 PM
|
i did not know about CTRL-F3
i have never seen alt_g fail on a variable, and i do use this fairly often. strange. if it is easy to email me a reproducible case it would help |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|