Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding code to every form/WriteMethod
Message
De
27/03/1998 10:30:23
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00087353
Message ID:
00087675
Vues:
40
Unfortunately, I learned the hard way. Are you saying that if I wiped out the ObjCode field when I changed the Methods field everything would have been okay? I thought that might have been a problem, but when I wiped out the ObjCode (after seeing that my Methods were messed up) I lost ALL the Methods code. What should I have done? Can I manipulate the Methods from the SCX?

>Elyse,
>
>A fundamental rule of overriding ANY method to augment behavior is to make sure you include either :: or DoDefault() to make sure you execute inherited code, even if you know there is no code in the class to inherit today, doesn't mean there won't be code there tomorrow.
>
<snip>
>
>The reason you hosed your forms was you changed the Methods memo without wiping out the ObjCode memo.
>
>>I added some code to the Init method of my form class and now I want to make sure this code is executed for all forms. The hard way would be to open up every form and add a DODEFAULT() to every Init method that has other code. Is there an easier way? Can I use WriteMethod to do this? What exactly does WriteMethod do and how is it used at design time?
Elyse Pomerantz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform