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
 Constructor(s) missing from List Methods dropdown
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kevinsikes
Tomato Guru

USA
271 Posts

Posted - Apr 25 2005 :  2:53:41 PM  Show Profile
The List Methods in File dropdown sometimes fails to list one or more constructors. Here is some code that models what I'm doing in a project:

typedef struct 
{
   int n1;
   int n2;
} MY_STRUCT, *LPMY_STRUCT;

class foo
{
public:
   foo(LPMY_STRUCT pRequiredParameter);
private:
   foo() {} // prevent a client from constructing a default instance
};

If I create a simple test project with this class definition, then the first constructor is listed correctly in the dropdown box when the .cpp file is displayed. (I do not expect the second constructor to be displayed, since there is no implementation in the .cpp file.) However, I have a more complicated project, in which no constructor is listed. I thought perhaps the UDT parameter in the constructor or the presence of a private constructor was causing grief, but the simple test case handles both.

VA_X.dll file version 10.1.1301.0
VAOpsWin.dll version 1.2.0.4
MSDev.exe version 6.0.9782.2
Devshl.dll version 6.0.9782.0
Devedit.pkg version 6.0.9782.0
Font: Courier -13(Pixels)
Comctl32.dll version 5.82.2900.2180
WindowsNT 5.1 Build 2600 Service Pack 2
2 processors

Platform: Win32 (x86)
Stable Includes:
d:\\compiler\\sdkjul02\\include;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE;
d:\\compiler\\ntddk\\inc;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\SRC;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\CRT\\SRC;

Other Includes:


Kevin Sikes
Infotainment Platform Design Engineer
Ford Motor Company

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 25 2005 :  3:11:04 PM  Show Profile
does the alt_m list show functions that are defined below the missing constructor in the cpp file?

i don't think i have ever seen a single function get left out of this list before. i am guessing that this problem only happens in certain cpp files?

do you have any other plugin's installed? it seems unlikely this is the problem, but it is wise to ask.

when you find a class that has this problem would you be able to strip down the code (removing the function bodies perhaps, but it still goes wrong) and then email it to me? i presume emailing the full code is not an option.

to try and cut down on spam i don't give out my email publicly , but if you email me via the forum i will reply.

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

kevinsikes
Tomato Guru

USA
271 Posts

Posted - Apr 25 2005 :  3:26:46 PM  Show Profile
Yes, functions are displayed that are below the missing constructor. The only other add-in I have is one that emulates some Brief behavior a little more closely than the Brief emulation provided with VC++ 6.0. It will take me some time to pare down the source file into a minimally reproducible scenario; I'll post when I have something. Thanks for the quick reply!

P.S. Interestingly, VC++'s own ClassView doesn't show the constructor either. Deleting the .NCB file does not help.

Kevin Sikes
Infotainment Platform Design Engineer
Ford Motor Company

Edited by - kevinsikes on Apr 25 2005 3:38:03 PM
Go to Top of Page

legion
Junior Member

Canada
12 Posts

Posted - Apr 25 2005 :  3:56:41 PM  Show Profile
quote:
Originally posted by kevinsikes

Interestingly, VC++'s own ClassView doesn't show the constructor either.

Yeah, I was just gonna say, this has never worked as far as I know, even without VAX.
Go to Top of Page

kevinsikes
Tomato Guru

USA
271 Posts

Posted - Apr 25 2005 :  5:13:54 PM  Show Profile
Here's the latest info. There was an additional BOOL parameter in the constructor (I had boiled down my example a little too far before), and when I changed BOOL to int, then VC++'s ClassView began to show the constructor. Here is the original declaration:

CFoo(LP_MYSTRUCT pMyData, CWnd* pParent /*=NULL*/, BOOL bSomeFlag /*=TRUE*/)

Also, this class is derived from MFC's CDialog (again, too much reduction in code in the example -- sorry).
Concerning VAX, if I load just the project containing the source file that implements this constructor, then it shows up OK in the alt_m list (whether or not I change BOOL to int). However, if I have multiple projects loaded into a workspace, then it does not show up. Odd. At any rate, I don't want to change my BOOLs to ints just to make VC happy, so I'm going to locate such constructors using the search dialog for now.

Kevin Sikes
Infotainment Platform Design Engineer
Ford Motor Company
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 27 2005 :  6:46:11 PM  Show Profile
thats fairly bizarre. my initial tests are unable to reproduce this problem. using VC6 + VAX 1299 i have a class derived from CDialog which now has the following three overloaded constructors:

CWelcomeDialog(CWnd* pParent = NULL);
CWelcomeDialog(CWnd* pParent = NULL, BOOL bSomeFlag = TRUE);
CWelcomeDialog(LP_MYSTRUCT pMyData, CWnd* pParent = NULL, BOOL bSomeFlag = TRUE);


i defined a dummy structure LP_MYSTRUCT holding 3 int's in the same header for completeness.

switching to the cpp file the alt_m list shows all three constructors. the obvious difference is that i have not included any additional projects into this workspace. i need to download some VC6 projects from codeproject and re-test this.

i am tempted to wonder if one of the additional projects is causing the problem, but it is hard to see how come.

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

kevinsikes
Tomato Guru

USA
271 Posts

Posted - Apr 28 2005 :  1:11:39 PM  Show Profile
I appreciate your efforts to reproduce this elusive problem. If I come with any more clues I'll post them.

Kevin Sikes
Infotainment Platform Design Engineer
Ford Motor Company
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 02 2005 :  10:47:19 AM  Show Profile
i have just downloaded two new VC6 projects from codeproject:

http://www.codeproject.com/useritems/EasyZip.asp

http://www.codeproject.com/tools/codeplotterremoded.asp

i re-checked the alt-m list after adding each project. in both cases i set the original project to be the active project. i now have three projects in this workspace, and the alt-m list is still listing all three overloaded constructors just fine.

next i closed and restarted VC6, still no difference.

is there some obvious step i am missing? it is beginning to look like there is some special feature of your code that is confusing the VA parser *sigh*

do you think you could start VC6 with no workspace, turn on logging in VA, load the work space, go straight to the relevant cpp file, open the alt-m list and then close the IDE?

i am looking for the shortest sensible set of steps to show this, so as to produce the smallest possible log file. if you produce a log file can you then email it to [email protected] and also reference this thread. perhaps this will help the developers work out what is going on here.

in the mean time if you find any clues i can re-test and see if i can reproduce the problem.

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

kevinsikes
Tomato Guru

USA
271 Posts

Posted - May 05 2005 :  2:25:20 PM  Show Profile
Hi feline,

Again I appreciate your diligence in trying to track this down. I created the log as you asked, but I took a peek at it and it contains too much proprietary information about my project; I can't send it in. I am in a "crunch period" right now and can't devote any more time to this particular problem, but after things settle down a bit I will see if I can get you a reproducible scenario that doesn't contain any sensitive source code. Thanks again!

Kevin Sikes
Infotainment Platform Design Engineer
Ford Motor Company
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - May 05 2005 :  4:58:47 PM  Show Profile
i know the feelings, and i am happy to try and help.

you may find alt+up arrow and alt+down arrow help. these move you to the next and previous scope, which actually moves you up and down one function at a time once you get to the outermost scope.

i use this in conjunction with the alt_m list, up and down for small movements and alt_m for big movements.

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