Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why NODEFAULT at all?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00042939
Message ID:
00042942
Vues:
28
>IMHO there should be no need at all for NODEFAULT; if you redefine a method the new code executes and not the old one -- DODEFAULT() is there should you want the old functionality. For example, if I redefine KEYPRESS, then the original default code should not execute -- but it does unless you use NODEFAULT; weird! OK, enough of that; only Microsoft can change this behavior.
>
>At least, does anybody know where can you find which objects do have a default method? So far, my programming method has been (!) "CODE IT; IF IT DOES SOMETHING STRANGE, ADD NODEFAULT". :(
>
>Thanks!

The VFP base control classes will fire their default events even if you override the event with your own code. The default behavior does a lot of things that you probably don't want to have to deal with in your code everytime you override an event. NODEFAULT allows you to override the base class behavior when you need to. For example there are times you don't want keypresses displayed. NODEFAULT gives you control of that.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform