Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DODEFAULT function for sub-classes
Message
 
 
À
26/02/2001 12:29:29
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00479534
Message ID:
00479947
Vues:
44
Hi!

Correct. Damn I forget about it! Yes, in subclasses use NODEFAULT before dodefault() for events. No need to do this for events that have no default VFP behavior, such as Click, DblClick etc. Such events as Mouse*, KeyPress etc etc require additional attention.

>Secondly, if the method has a default VFP behavior, it may get executed multiple times..., unless you remember NODEFAULT.
>PROCEDURE Refresh()
>* This is in a fourth level subsclass of a Form.
>Subclass code.
>NODEFAULT && Added 'cause otherwise the controls are
>* refreshed twice!
>RETURN DODEFAULT()
>Likewise with the KeyPress of a control. If you DODEFAULT() twice with no NODEFAULT at all, you can get two letters for each kkeeyypprreess. Not good.
>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform