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
 VAX 1424: correct, but...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Oct 05 2005 :  9:58:17 PM  Show Profile
Looking at those screenshots of the context bar... its somehow correct, but at the same time it is wrong too. #defines, in this cases typical message maps and performace counter maps, show up as functions of the classes using them. But also, there are macros which show up as global functions (PERFREG_ENTRY(CLeonPerfMon);) or the double ctor of CAboutDlg which does not exist at all (CAboutDlg is defined as
class CAboutDlg : public CDialogImpl<CAboutDlg> { ... }


Not sure if those message-map type macros should be shown at all in the context list.


feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 06 2005 :  6:12:03 PM  Show Profile
i am not sure about the message map macro's, but it does make a sort of sense. however they should not be shown as class members. i have checked 6 different cpp files here (VS 2003, VA 1424) and none of my message map macro's are shown as class members.

in the second screen shot the duplicate line for CAboutDlg is using the class icon. if it was really listing the constructor it should say "CAboutDlg.CAboutDlg"

this is odd. simply adding the code:

class CAboutDlg : public CDialogImpl<CAboutDlg>
{
    CAboutDlg()  {}
    const char *programName()  { return "Feline Testing"; }
}


to a cpp reproduces the double entry in the alt_m list, both items with the class icon. however i also get a class constructor item in the alt_m list, which i am not seeing in these screen shots.

case=813

would it be possible for you to post a small piece of code that reproduces more of these problems?

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Oct 06 2005 :  7:50:36 PM  Show Profile
I can send the file from the first screenshot if that helps. The other one is a simple dialog with no special code, wizard generated.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 07 2005 :  5:25:19 PM  Show Profile
that would be most helpful. i have emailed you via the forum, since i dislike posting my email, i don't want to encourage any spam *rolls eyes*

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Oct 07 2005 :  6:31:55 PM  Show Profile
Done
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 10 2005 :  6:55:24 PM  Show Profile
i have the file, thank you. i just need to find the time to check this out now

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

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 16 2005 :  3:45:02 PM  Show Profile
finally i have got around to this file, sorry about the delay, it has been busy around here of late.

i now know why none of my tests showed message map lines in the alt_m list, all of my tests were looking at:

BEGIN_MESSAGE_MAP(CColorComboBox, CComboBox)
END_MESSAGE_MAP()

blocks that were in cpp files, and not inside class definitions. obvious when you spot it taking a nice simple example, if i strip down the CPOLeonApp class to read:

[code]class CPOLeonApp : public CPerfObject
{
public:
BEGIN_COUNTER_MAP(CPOLeonApp)
DEFINE_COUNTER(Exceptions, "Exceptions", "Unexpected Exceptions", PERF_COUNTER_RAWCOUNT, 0)
END_COUNTER_MAP()
LONG Exceptions;
};

i look at this (as someone who does not know anything about ATL) and think "this looks like a member function". as such, it makes sense that it is in the alt_m list. is this a reasonable interpretation? or is there a good case to say that these should not be in the list? begin and end map look rather more out of place, but to a simple regex they look just like functions. it is probably worth putting in a case to request that these are not shown in this list.

how many types of map are there? looking through "atlperf.h" i am only seeing:

BEGIN_PERFREG_MAP() -> END_PERFREG_MAP()
BEGIN_PERF_MAP() -> END_PERF_MAP()
BEGIN_COUNTER_MAP() -> END_COUNTER_MAP()

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Oct 16 2005 :  5:16:06 PM  Show Profile
Hmmm, basically they are just #define's, as such, they can be anything. A simple example of a xxxx_MAP define:


#define BEGIN_MY_MAP(a)    private: typedef struct a {
#define MY_MAP_ENTRY(b)    int b;
#define END_MY_MAP(a)      } MAP_##a;


But it could also be:

#define BEGIN_MY_MAP(a)    private: class subclass {
#define MY_MAP_ENTRY(b, c) private: int m_##b; public void Set##b(int p=c);
#define END_MY_MAP(a)      } m_##a;


So, what is VAX supposed to show in the context list? For the first sample a member variable of type int? For the second sample, a class with a function SetWhatever(); ... ?

As long as it cant really RESOLVE the #defines, I guess it would be best to just leave them out, or just show them as #defines, not as members functions.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 17 2005 :  2:57:54 PM  Show Profile
that is reasonable. i have put in a case to leave them out of the list.

case=845

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