Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple class question
Message
 
To
08/01/1999 22:41:15
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00173492
Message ID:
00174510
Views:
33
>Christof, Jim,
>
>Occasionally I use the :: Scope Resolution operator. How does this differ with DoDefault()? Did I miss something here?
>
>TIA.
>


Kenneth,

Using the cope resolution operator requires that the parent class's name be hardcoded into the method of the child class. This violates the encapsulation of the code in teh child in that the child must know its parent's name. DoDefault() fire the code of the immediate parent class without refrencing that class by name and is therefore more encapsulated. If, at a future date, you were to use the class browser to change the parent of a particular class the call to the parent's code would still owrk using DoDefault() however it would fail using the scope resolution operator.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform