Microsoft KB Archive/131941

= PRB: Class Browser Does Not Recognize Inheritance =

Article ID: 131941

Article Last Modified on 2/15/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q131941



SYMPTOMS
The Class Browser (Browser.app) displays only the methods, properties, and members that were added directly to the class. What you do not see are any methods, properties, or members that the class inherited from a parent class.

For example, you create a text box class and add a new method to the class. Then you creast a new class based on and a method is added to this. In the properties sheet under the Method tab, you can see that the inherited method from the is shown with the method added in the. However, when you run the Class Browser and select the, the Class Browser displays only the method added directly to the.



STATUS
This behavior is by design. The class browser only shows members of the immediate class, not of any parent classes.

There are two reasons for this:


 * It would be difficult, slow, and possibly problematic to open every associated .VCX file of all parent classes when scrolling through the class list to find all the inherited methods.
 * The inherited members can be displayed in the Class Designer by using either the Properties sheet or the Class Info dialog box.



Steps to Reproduce Behavior

 * 1) Create a class called testparent based on a text box, and store the class in Test.vcx.
 * 2) Add a new method to the testparent class called test1. Save the class by clicking Save on the File menu.
 * 3) Create a new class called testsub based on testparent, and store the new class in Test.vcx.
 * 4) Add a new method to the testsub class called test2. Save the class by clicking Save on the File menu.
 * 5) Open the Properties sheet with testsub open, and click the Method tab. Look at the bottom of the method list to verify the existence of two additional methods (test1 and test2).
 * 6) Close the Class Designer, and start the Class Browser.
 * 7) Open the Test.vcx library when prompted.
 * 8) Click the testsub class in the class hierarchy tree.
 * 9) In the list under the All tab, the only item showing is 'm ~ test2'. If it is not showing, make sure the Empty button is depressed. The testsub class did inherit the test1 method but it is not displayed in the Class Browser.

Additional query words: VFoxWin

Keywords: KB131941

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.