|
|
Some possible Work-Around's for Bugs #1,2,3 NEW Service Pack 5 for Visual Studio is now available http://msdn.microsoft.com/vstudio/sp/vs6sp4/default.asp Service Pack 4 for Visual Studio is now available http://msdn.microsoft.com/vstudio/sp/vs6sp4/default.asp Perhaps SP4 will fix some of these Class Wizard bugs !
Class Wizard Reusing code is a feature I like. If I have a class that I need to reuse, I can insert it into a project, this can be done with a minimum of effort. The bug happens about 5 out of 10 times, and then there seems to be no fix for it. If I copy the .cpp and .h files into the project folder, then use the menu items Project/Add to Project/Files and select the cpp and h files they are inserted into project. However the Class Wizard does not update it's database information, this has been a "feature" ( I'm not sure if it's a bug) for several versions, and the simple work-around is as follows:-
As I said this works 5 out of 10 times. You will know when it's about to fail, as the following message appears ( fig 1)
The class "CListManager" uses a file named ListManager.cpp and ListManager.h, both file were added to the project without error, so why do I get this message. I tried to add these two files again, and here is the message that appears ( fig 2)
Well if it's already in the project, why does it refuse to use it ? In the Class View I have full access to CListManager as you can see in (fig 3)
March 16, 2001 Solution:- Install SP5 or SP6 I know of no way to make the Class Wizard accept these two files. I have searched the Microsoft Knowledge Base (KB) and I cannot find an answer. The KB is so large, and if you do not know the key word it can take hours to find a solution or find nothing.
Class View ( May be part of Class Wizard, I don't care as long as it works ! ) This is a different bug, and may be related to Bug#1. Sometimes when adding a class using Class Wizard, one or other class ( it appears to be random !) may disappear from the Class View ( fig 3 ). Deleting the <class name>.clw file and rebuilding does not solve this problem. Work-around: This works 50% of the time. (March 16, 2001 Solution:- Install SP5 or SP6)
If this does not make the class reappear in the Class View, then there is little hope of ever seeing the class again! From then on you will have to manage the class by opening files and editing it the old fashioned way. As no other solution has been offered by Microsoft, I have to assume Microsoft considers this bug acceptable.
FYI Microsoft is already working on a new version of Visual Studio ! What can we expect ? more bugs ? Link to Microsoft's Page about the new Visual Studiohttp://msdn.microsoft.com/vstudio/nextgen/overview.asp Visual Studio 6.0 needs to be fixed first. We paid money for it and it does not work.......! Update ! since the release of SP5 and now (March 16, 2001) SP6 it appears Microsoft is making an effort to fix these and other bugs. Who knows may be it's the pressure of a falling stock price, or may be it's "real service" ! whatever it is, it was a long time coming. On an average day, I can Save/Close the Workspace and rename the .cls and ,ncb files 10-20 times. The idea behind the Visual Studio IDE was to save time.... After SP5 it would appear the IDE is saving me time ! March 16, 2001 Solution:- Install SP5 or SP6 Class Wizard During the attempt to fix Bug#1 or #2 when Class Wizard give the choice to "Add" a file or "Add All" I tried adding files on an individual basis, in the hope that it may be a solution. The message I get when trying to add individual files is shown in fig 4.
If I click the "Add All" there is no error message ! That's strange, if it can't add the individual file, then that same file has to be included by definition when the "Add All" button is clicked ! Yet it does not generate an error ! March 16, 2001 Solution:- Install SP5 or SP6 If you have a solution please send it to mailto:solutions@hans-w.com Possible work-around for Bug#1,2,3 These suggestion are all well and fine, but disabling some of these features, partially negates some of the reasons for spending the money on Visual Studio 6.0. Disabling Wizard Bar, means a loss of productivity, disabling IntelliSense in effect makes VS 6,0 the same as Version 5.0 ! ( One step forward and three steps back ) Some advice I received from Microsoft. Its possible that for some reason the files are getting corrupted. Every time you add a variable, class, etc. the ncb file gets updated. The WizardBar also uses the ncb file besides ClassView. Here are some suggestions:
KB Articles
March 16, 2001 Solution:- Install SP5 or SP6 I'm just as pissed off as you are at all the bugs, they drive me nuts on a daily basis as well. One thing I do that seems to avoid most problems with classwizard being able to browse and display classes. Whenever I want to add a file into my project I:
Doing it this way seems to let class wizard go through all the proper steps and register it correctly. Note: Do the same thing for H files, you will get an additional dialog warning stating that VS can't find the associated tool to compile it, but by the time you get this message, the file has already been registered and added. Most of all, you didn't really want to compile a H file anyways, so who cares, the goal was adding it to the project. Finally, this technique also works with Dialog classes if you copy the dialog resource into your rc file using the resource wizard then double-click on the dialog itself inside the editor. It posts a similar warning asking you if you want to include the class. Clicking <YES> get's it registered properly almost every time. Please keep the heat on. Us little guys don't stand a chance against MS, but at least we can all feel better by yelling about it. regards, Phil Thanks for the tipMarch 16, 2001 Solution:- Install SP5 or SP6
Visit my web site Hans Wedemeyer's Projects, Code and More Copyright© 2000 Hans Wedemeyer, Houston, Texas, U.S.A. All Rights Reserved. |