Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Destroying an object
Message
 
À
26/08/1997 23:02:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00046886
Message ID:
00047360
Vues:
27
>only if you call the internal event (e.g form::destroy(),
>textbox::keypress(nKeyVal,nALTSHIFTCTRL etc.)
>
>Arnon
>>I presumed that whatever internal code does not get executed when you do
>>NODEFAULT, would get executed when you manually call the event!
>>
>>Darrel
>>

Oh, now I understand. This is getting ridiculous. If the event method is called manually the base class method is not called automatically, but if that same event method is called by an event the base class event method is called automatically. I guess this is justification enough never to call an event method directly!

I would have much prefered if MS had told us that if we were going to override an event we had to place a DoDefault() at the end of our code so that at least the behaviour of a base class would be consistent with that of a subclass. They could even autoinsert the DoDefault() into any event method as the do with methods that have parameters.

Thanks,
Darrel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform