Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Context bar, SIW, land too high in long file
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Feb 04 2004 :  7:11:42 PM  Show Profile
I have a problem when trying to navigate in long files -- say 4000 lines or so. It often happens that the context bar and the SIW don't know where a function is. They land me several tens of lines too far up the file.

Alas, it's not true of all long files. Is anyone else seeing this?

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004

support
Whole Tomato Software

5566 Posts

Posted - Feb 04 2004 :  8:12:49 PM  Show Profile
See if the problem is reproducible. After the confused move, go to the top of the file and try again.

Does the problem occur, or reoccur, after opening a file, ie without modifications? If so and the problem is reproducible, you are welcome to send us the file. Something in it is confusing VA X. (We agree not to use your code for anything bug debugging of this problem.)

If reproducible, you have might something in the file that confuses our idea of a line. Are all lines terminated equally, ie with \\n, \\r\\n, \\r? Do you have null bytes in the file?

Whole Tomato Software, Inc.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Feb 04 2004 :  9:01:15 PM  Show Profile
I have seen similar kind of behaviour in some files when the file contains #if blocks in functions, but I can not exactly point my finger on it. As much as I know VA does not parse the #if's so it should not matter.
But it somehow seems that when I have 20 lines in a #if block, all following functions are off by 20 lines. But it seems to be not always.
Go to Top of Page

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Feb 04 2004 :  9:19:13 PM  Show Profile
I think you've hit the nail on the head, Uniwares.

Here is a sample file I tried it with. Apologies for pasting 30 lines -- I couldn't be bothered to find the shortest possible example.

In the following file, going to DoSomeStuff() using the context bar goes to the correct place: going to DoOtherStuff() ends you up five lines too high.


#include "a.h"
#include "b.h"
#include <cstdio>

class CMyClass
{
public:
	CMyClass();
	~CMyClass();
	void DoSomeStuff();
	void DoOtherStuff();
};

void CMyClass::DoSomeStuff()
{
#if 0
	for (int i = 0; i < 17; ++i)
	{
		PutYourLeftLegIn();
		PutYourLeftLegOut();
	}
#endif
	DoOtherStuff();
}

void CMyClass::DoOtherStuff()
{
	FILE *f = fopen("output.txt", "w");
	fprintf(f, "Doing other stuff");
	fclose();
}

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 01 2004 :  12:02:30 PM  Show Profile
Fixed in build 1218.

Whole Tomato Software, Inc.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 02 2004 :  11:58:17 AM  Show Profile
thank god for this! i have been removing all of the #if 0 #endif blocks from my code as a work around. nice to see that i dont need to anymore :)

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000