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
 Spelling errors cached and used in strings?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Jan 28 2004 :  10:15:27 PM  Show Profile
Unfortunately I can't reproduce this in a small example, but you might be able to figure out the cause anyway.

I have some code like:

else if (sData == _T("FooBar"))
{
    s.Format("%d", theApp.FooBar());
}


theApp.FooBar() doesn't exist yet. But when I finish typing the second FooBar(), both FooBars get squiggly red lines, i.e. the one in the string too. It only happens if the two names match though. Is it possible that spelling mistakes are cached and then recalled inappropriately in a string?

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

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Feb 11 2004 :  05:52:58 AM  Show Profile
Here's a better example:

#include <gdiplus.h>
using namespace Gdiplus;

class CMyColor
{
	static const Argb VERY_PALE_BLUE = 0xffeaf2ff;

	// Interpret a string as a colour
	//
	static Color ColorFromString(LPCTSTR lpsz)
	{
		ASSERT(strlen(lpsz) == 6 && strspn(lpsz, "0123456789ABCDEFabcdef") == 6);  // 6 characters, all hex digits
		return Color(0xff000000 + strtol(lpsz, NULL, 16));  // ff is opacity
	}
};

When the comment at the end is typed, "ff" is underlined as mis-spelled, but also the "ff" at the end of the hex constant is underlined at the same time, as shown. If "ff" in the comment is changed to something else, the "ff" in the constant loses its underlining too.

I suspect that there are two bugs here. One is that VA thinks that "ff" at the end of the constant is a new word (if "2" just before it is changed to "a", this doesn't happen any more). The other is that the "ff" in the comment is somehow remembered and used in a code section.

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
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