Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pitfalls of using form/formset classes
Message
De
04/09/2006 12:08:08
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01150667
Message ID:
01150723
Vues:
46
>Hi all:
>
>This is the first time I am using form classes. In my application, I decided to use several form classes that I reuse for many different forms. Sort of cool stuff and I think would make things easier to maintain.
>
>My worry is, what are the pitfalls of using such form classes? Is there anything that I need to look out for? Sorry my question may be quite general in scope, but my purpose is to be able to foresee what problems I would probably hit, and if it is really feasible to do so in the first place. I am just trying to avoid the scenario where I am halfway into a project and find out that what I am doing does not work at all; I have had enough of such experience. :)

One thing to avoid is to put too much functionality in your base form class only to have to remove it in a specific case. You may actually need several base form classes - one for data entry, one for dialogs, plus whatever you may need later.

Also, if your controls are supposed to play with your form (say, a textbox's validation actually calls a form's method), then ALL your forms must have that method or you need another textbox class which doesn't require that the form has that method. You may implement hooks (i.e. abstract, empty methods) in your top level form class, which would only have some code in the next lower level class. And then you'd only create your forms as subclasses of these lower level classes.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform