Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textboxes autoselect upon mouse click?
Message
De
22/05/2001 17:05:28
 
 
À
12/05/2001 07:19:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00505893
Message ID:
00510086
Vues:
17
>I hate to disagree with you here, but < s >...
>
>DODEFAULT() calls up the class hierarchy and executes the code (if any) in that method in the parent class.
>
>Native VFP base class code runs after your custom code (if any) in the method.
>
>So if your custom class is directly subclassed from a VFP base class, and you have custom code in a method that includes a DODEFAULT(), the code of the parent class (the base class) gets executed. Then, at the end of your method, the base class code gets executed as usual.
>
>By design (IMHO).


Agreed. By design. But IMHO, not a consistent application of classical class inheritance (...as I understand it).

IMHO any appearance of any code in a method of a subclass should prevent execution of ANY AND ALL code up the hierarchy unless explicitly called by the overriding subclass code. That's how it works for any custom methods I write.

I can see the coding advantages of having the default behavior execute automatically, in spite of intervening code in the hierarchy. Still, it's not in keeping with behavior of methods not inherited from the base class.

As a coder, I must know that both NODEFAULT and DODEFAULT() must appear in any event method where I want to completely control the execution of the default behavior relative to the new behavior I'm adding. Whereas, in methods I've added (...to my virtual base class,say), only DODFAULT() is required in subclassed methods thereof.
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform