Author |
Topic |
|
yuxiliu
New Member
6 Posts |
Posted - Dec 23 2004 : 3:38:39 PM
|
"List methods in current file" stopped working after I upgraded my VAX from build 1246 to build 1289. It seems like build 1289 cannot process one of my macro correctly, please find attached screen shot. Build 1289 only lists the methods before first occurrence of macro "CATCH", -if you move "TRY-CATCH" macro to TestClass::F3(), then F3 will show up in list method box. (I'm using VS.NET 2003 VC++ project)
|
Edited by - yuxiliu on Dec 23 2004 4:13:38 PM |
|
yuxiliu
New Member
6 Posts |
Posted - Dec 23 2004 : 3:48:46 PM
|
And the source code of TRY-CATCH MACRO #define TRY try { #define CATCH( source )\ }\ catch ( _com_error& err )\ {\ }\ catch (std::runtime_error& e)\ {\ }\ catch ( ... )\ {\ }
Any workaround? Thanks! Yuxi |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Dec 23 2004 : 3:58:43 PM
|
We can't see images on your hard disk! (Aside: I never understand why people expect us to be able to). |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
yuxiliu
New Member
6 Posts |
Posted - Dec 23 2004 : 4:14:00 PM
|
Please try again...
Yuxi |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
|
yuxiliu
New Member
6 Posts |
Posted - Dec 23 2004 : 4:36:41 PM
|
I guess I have to use this macro because I'm working on a big project, - 9 developers, more than 50 modules, and this macro has been used everywhere in this project |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 29 2004 : 4:00:19 PM
|
having placed this code into one of my cpp files, even when the #defines for TRY and CATCH are present in the same cpp file, TRY and CATCH are being shown in italic's
yuxiliu, if you turn on VAX options -> environment -> fonts and colours -> stable symbols in italic
do you see TRY and CATCH in italic? for me these are being picked up from:
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include\\afx.h
and the #defines are:
#define TRY { AFX_EXCEPTION_LINK _afxExceptionLink; try {
#define CATCH(class, e) } catch (class* e) \ { ASSERT(e->IsKindOf(RUNTIME_CLASS(class))); \ _afxExceptionLink.m_pException = e;
if VAX is using these definitions in your code then the resulting mismatched curly brackets (i count 2) will explain why no further methods are listed in the alt_m list. |
zen is the art of being at one with the two'ness |
|
|
yuxiliu
New Member
6 Posts |
Posted - Jan 02 2005 : 9:48:35 PM
|
You are right, I saw the same behaviour on my machine. Do you have any idea how to make VAX pick my "TRY-CATCH" instead of "afx.h"'s? I tried modifying project settings, and changing VAX's options, but no luck... :(
Thanks, Yuxi |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Jan 03 2005 : 04:51:13 AM
|
*Hollow laughter*. Unfortunately, #define's are pulled in from all files, with no regard for whether they're actually included in the current file or not. I regard this as a major design flaw in VA. The developers don't seem to think it's important, or maybe not fixable, or both.
See threads 2390, 2951, 2994 and many more. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Jan 04 2005 : 09:32:03 AM
|
as Stephen says, there is no good fix. however, if you never need AFX then you should be able to get VAX to ignore the sub directories holding the .h with this definition of TRY and CATCH
http://www.wholetomato.com/products/features/directories.html?more=yes
not an ideal answer, but in theory this will work. then we have to hope that VAX will be OK with your local TRY and CATCH. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|