Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class Design Question
Message
De
06/12/2006 05:22:11
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
06/12/2006 04:36:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01174970
Message ID:
01175131
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
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform