Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DoDefault() or Hooks?
Message
 
 
À
11/08/1999 06:43:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00252400
Message ID:
00252427
Vues:
12
>I am seeking opinions on using a hook for methods like init, load, destroy or using DoDefault(). With a hook I sometimes forget it and put code in the init anyway then I have to go back an move it... Is there any other way to have some code in the init and when you use the subclassed form put in DoDefault() in the init to remind you that there is code up the line in the init?
>
>
>Thanks

Several things come to mind. One, I use Ken Levy's ClassX where I can have the parent method code popped up for me. Second, I do have custom methods called AddLoad, AddInit, AddActivate, etc., that are called at the end of the Load, Init, Activate, etc. So, as a practice, I do not put any code the default methods. Lastly, in VFP 6 [SP3], if you put a parameter statement in a method, that statement is carried over to the subclass if you open that method for editing. AFAIK, there is no other way except to remember how your particular framework works.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform