Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class Design Question
Message
 
 
À
06/12/2006 05:22:11
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01174970
Message ID:
01175193
Vues:
8
>>Consider calling mycontainerclass::mouseenter(...) to call the method of your class the way it is defined in the class.
>>
>>Take a lok at the :: operator in the help.
>
>>Take a lok at the :: operator in the help.
>
>Tsssss. ::)
>Some people here call the use of Scope Resolution Operator poor class design. I will not argue the point (I still have two or three of it) but I give you at least one reason to think over it.
>
>Scope Resolution Operator is very bad - particularly with hidden and protected stuff.
>The method called by the Scope Resolution Operator runs in the context of the calling method, not in its own.
>
>IOW:
>A method that uses a protected property of it's level runs fine when used via direct method call or DODEFAULT()
>It will fail called by ::.
>
>One can always avoid it. I, personaly, think that if it comes to the point to think on :: the base method is overloaded.
>
>Agnes

Agnes,

Sorry for jumping it without reading the whole thread. I think the word "overloading" can be misleading. I was thinking about it as the child class may introduce new behavior and disable parent's class behavior. Apparently I used the word wrongly since it means, that within the same class we may have several methods with the same name but different parameters doing different things. This kind of overloading is obviously not supported by VFP.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform