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:
00174360
Vues:
30
Kenneth,

I mostly use ::, I rarely find it necessary to change what something is derived from so having a hardcoded ParentClass name isn't a problem for me. Plus it keeps my code more C++ like which another language I use frequently. I do find DoDefault() to be easier to use when overridding code of composite classes.

There is also a bug in VFP (I've not yet tested to see if it still occurs in VFP6) where if you have a grandchild class that uses DoDefault() to an empty ParentClass method you end up getting the BaseClass method executing twice. This is only significant in cases like TextBox.KeyPress where the behavior can be "observed" to know it's executed twice. If you look at the Quicken txtDate class on my website under Q&A, OOP there is more detail about the problem.

>Occasionally I use the :: Scope Resolution operator. How does this differ with DoDefault()? Did I miss something here?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform