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
 Problem with macros and namespaces
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pwc
Tomato Guru

138 Posts

Posted - Jan 02 2008 :  7:06:27 PM  Show Profile  Reply with Quote
Hello,

The following code doesn't parse correctly:



#include <vector>


#define DEFINE_TABLE(cls) DEFINE_TABLE_ENTRIES(cls)

#define DEFINE_TABLE_ENTRIES(cls)\	cls::TableEntries  cls::__entries[] = {


namespace
{
	class CMyClass
	{
	private:
		struct TableEntries
		{
			int a,b;
		};
		static TableEntries  __entries[];
	};

	DEFINE_TABLE(CMyClass)
	{0,0},
	{0,0}};

	int GetLineCount(const int& colNames)
	{
		return colNames.size();
	}
}


The argument to the GetLineCount function is not recognized (colNames is underlined in red).

My info:

VA_X.dll file version 10.4.1624.0 built 2007.12.07
Licensed to:
VA X: [email protected] (5-user/10-PC license) Support ends 2008.11.27
DevEnv.exe version 9.0.21022.8
msenv.dll version 9.0.21022.8
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
2 processors

Platform: Win32
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;

Other Includes:

Stable Source Directories:
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\crt\\src;



feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 03 2008 :  1:49:36 PM  Show Profile  Reply with Quote
Interesting. Thank you for the clear example, I am seeing the same problem here. For me editing VA's "StdAfx.h" file as explained in this FAQ entry:

http://docs.wholetomato.com?W302

and adding the entry:

#define DEFINE_TABLE(cls) {

at the bottom fixes the problem. This file is used to help VA's parser with difficult code, and can be used to work around odd effects. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

zen is the art of being at one with the two'ness
Go to Top of Page

pwc
Tomato Guru

138 Posts

Posted - Jan 03 2008 :  2:52:25 PM  Show Profile  Reply with Quote
Will this be fixed in a future release, or is the workaround the fix?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 08 2008 :  1:56:34 PM  Show Profile  Reply with Quote
Looking at this, I am wondering if this is similar to the namespaces via #defines problem that a couple of other users are seeing. If so the next version of VA might help. If it does not I will put in a bug report for this.

For now though the stdafx.h work around should help.

zen is the art of being at one with the two'ness
Go to Top of Page

pwc
Tomato Guru

138 Posts

Posted - Jan 18 2008 :  5:40:34 PM  Show Profile  Reply with Quote
I tried 1626. It still has this problem.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 19 2008 :  1:35:33 PM  Show Profile  Reply with Quote
Confirmed. I still wonder if this is related to the namespace problem Uniwares is seeing, but so far I cannot find the connection. I have put in a bug report for this:

case=11586

For now I recommend using the VA stdafx.h file work around.

zen is the art of being at one with the two'ness
Go to Top of Page

pwc
Tomato Guru

138 Posts

Posted - Apr 09 2009 :  4:18:07 PM  Show Profile  Reply with Quote
Still a problem in 1721.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 09 2009 :  5:33:52 PM  Show Profile  Reply with Quote
Unfortunately this is still in our list of things to fix. This thread should be updated when this bug has been fixed.

zen is the art of being at one with the two'ness
Go to Top of Page

pwc
Tomato Guru

138 Posts

Posted - Nov 19 2010 :  11:06:30 AM  Show Profile  Reply with Quote
Just a friendly ping: still an issue in 1833.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Nov 22 2010 :  4:02:40 PM  Show Profile  Reply with Quote
Unfortunately still no progress, some bugs are harder / slower to address than others. Hopefully the VA StdAfx.h file work around is still working well for you.

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