Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Method doesn't show up, but it's there
Message
From
08/10/2000 20:32:58
 
 
To
08/10/2000 03:57:33
Steven Edge
Soft Solutions Limited
Lagos, Nigeria
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00426501
Message ID:
00426693
Views:
37
But the method has code in the present (Child) class, but not in the parent!

If you modified code in the existing class, shouldn't it show in the class browser? Shouldn't it be like the situation with the properties sheet? If I'm inheriting code from a parent in the 'LostFocus' method, I'm not going to see it (unless I use SuperClass, of course).

But in this case, the code RESIDES in the class I'm browsing, not in the parent class. Why doesn't the method show up in that class?

Still confused in California (I'm beginning to fit right in).

>You've had two answers already, but let me try to explain it my way also.
>
>Assume that you have defined a class with these properties and methods.
>
>CLASS_A (Subclassed from CUSTOM)
>===Method1
>+++Property1
>
>You also have another class made from the first one where you added one property and one method. You will no have:
>
>CLASS_B (Subclassed from CLASS_A)
>===Method1 (defined in CLASS_A)
>===Method2 (new)
>+++Property1 (defined in CLASS_A)
>+++Property2 (new)
>
>Now, if you look at these in the class browser, you will only see the ones that were newly defined in the class. That means that if you look at class_a you will see:
>
>CLASS_A
>===Method1
>+++Property1
>
>If you look at class_b you will see:
>
>CLASS_B
>===Method2
>+++Property2
>
>This is in spite of the fact that Method1 and Property1 actually exist in the class.
>
>If you want to see ALL properties and methods present in a class, you can right-click the class and chose "Select Parent Class". Continue selecting parent classes until you reach the bottom of the tree. The total of properties and methods in a class will be the combined properties and methods of all the classes in the tree.
>
>
>Hope it helped. Classes can be confusing when you start out.
>
>Steven
-- John Kiernan
"Maybe Amelia Earhart was just stealing the plane".
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform