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
 Open Corresponding C++ Header-File doesn't work
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sebhad
Junior Member

Germany
14 Posts

Posted - Feb 15 2008 :  02:42:55 AM  Show Profile  Reply with Quote
Dear Feline

the situation:

- one header file "view.h"
- two corresponding source files "view.cpp" and "viewx.cpp" that both includes the header file "view.h" (in order to split the code in two files)
- one of the source files has not the same name as the header file

When editing the source file "view.cpp" the command "Open Corresponding File" opens the header file correctly.

When editing the source file that name is not the same as the header file file "viewx.cpp" the command "Open Corresponding File" does nothing!

Thank you!

Sebastian



VA_X.dll file version 10.4.1626.1 built 2008.01.17
Licensed to:
VA X: [email protected] (6-user license) Support ends 2008.05.15
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32
Stable Includes:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include;
E:\\C_Progs\\GP\\Inc;
E:\\C_Progs\\GP\\Libraries\\Include;

Other Includes:

Stable Source Directories:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;




VA_X.dll file version 10.4.1626.1 built 2008.01.17
Licensed to:
VA X: [email protected] (6-user license) Support ends 2008.05.15
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32
Stable Includes:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include;
E:\\C_Progs\\GP\\Inc;
E:\\C_Progs\\GP\\Libraries\\Include;

Other Includes:

Stable Source Directories:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Feb 15 2008 :  09:27:20 AM  Show Profile  Reply with Quote
This is by design.

"viewx.cpp" is not the corresponding file for "view.h", so alt-o is not going to jump from one file to the other.

Before you say that "VA should work out they are related" what happens when you have files like:

object.cpp
object.h
objectSquare.cpp
objectSquare.h

Currently these are unrelated pairs of files, but if you want to say "the file names are similar" then suddenly alt-o should view them as the same block of files.

If you need to split your code into three files have you considered "view.h", "view.cpp" and "view.inl" ?

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

pwaugh
Ketchup Master

USA
68 Posts

Posted - Feb 17 2008 :  11:20:14 AM  Show Profile  Reply with Quote
If you "need" to split your code, have you considered that perhaps this is a design issue? Maybe you need to break the object down further to make it more comprehensible to you.

Really, with a tool like VAX and the VS IDE, if you are writting solid OO code, then why would you "need" to make what should be in one .cpp file into two?

Just curious. The "corresponding" .h file for AnyFile.cpp IS ONLY AnyFile.h by definition (of the C++ language)! What would you expect Alt-O to do when a .cpp file includes 10 .h files?????

In case you are a relatively new C++ programer (like me) I highly recommend the book "C++ Primer Plus" and any of the "Head Start" series. =)

Programming in C++

VA_X.dll 10.4.1626.0
Built 2008.01.17

(1-user license) Support ends 2009.01.29

DevEnv.exe version 9.0.21022.8
msenv.dll version 9.0.21022.8
Comctl32.dll version 6.0.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
Single processor
Platform: Win32
Go to Top of Page

sebhad
Junior Member

Germany
14 Posts

Posted - Feb 18 2008 :  04:31:19 AM  Show Profile  Reply with Quote
Ok. You are right. I did this topic rashly without thinking enough about it!

Thank you all for the detailed answers!

VA_X.dll file version 10.4.1626.1 built 2008.01.17
Licensed to:
VA X: [email protected] (6-user license) Support ends 2008.05.15
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32
Stable Includes:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include;
E:\\C_Progs\\GP\\Inc;
E:\\C_Progs\\GP\\Libraries\\Include;

Other Includes:

Stable Source Directories:
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl;
C:\\Programme\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;

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