Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple class question
Message
 
À
08/01/1999 22:41:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00173492
Message ID:
00174510
Vues:
34
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform