Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Method code lost
Message
 
À
08/09/1998 06:48:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00133980
Message ID:
00134279
Vues:
10
>I have a form class where I have some code in the load method. If I put code in the load method of a form based on this class I lose the original code. How can I prevent this?
>
>Thanks

A slightly different method from Jim's suggestion is one used by many of the commercial frameworks. In your base form you have an 'AfterLoad', 'AfterInit' etc. methods. In the base form code you call these functions, so that the base form's LOAD method would include "thisform.AfterLoad()" at the end of all its other commands.

THen, if you wish to add code to the LOAD event you simply place it in the AfterLoad() method and know that it will be called after the base code is done.
This is a very convenient technique when you have code in base forms, particularly if there are several layers of subclasses involved.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform