Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass parameters to subclassed form
Message
 
À
15/11/2006 23:23:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01170136
Message ID:
01170294
Vues:
9
>>I've created a simple form class. I would like the init of the class to do certain tasks. I also need to pass the form parameters. If I put a "parameters" statement in my form init the form class init doesn't run. So I need to include a dodefault in the form init. I don't like having to include dodefault in the form init each time I make a form. Is there any way around this?
>
>No.
>
>Actually yes... but you won't like it, because it's a remedy worse than the disease: repeat all the parent class code.
>
>A better way would be to provide a hook method in your parent class, which is the general approach to solving things like this. Unfortunately, if the number of parameters your form receives is different from the number of parameters in the parent class's init method, you'd still have to accommodate that somehow - and we're back at doing a dodefault().


Ok... Thank you!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform