Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Hitch Hikers Guide to Formsets
Message
De
08/07/1997 22:52:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00038807
Message ID:
00039037
Vues:
33
Hi Michael,

Something interesting about formsets: They are extremely lightweight (and fast-instancing) objects so they serve very well when you need the equivalent to CUSTOM class but with a private data session.

Something else about FormSets: You can use them without making them top-heavy with forms. FormSets have ADDOBJECT() methods like any other container, so you can add Forms to the FormSet on a pay-as-you-go basis. Having a formset with a single form is about equivalent to having just the Form since the FormSet is so lightweight...

To answer your question specifically, a customer of mine had a bunch of forms that all called a common report interface, whereafter the forms go away leaving the report interface live. By using a FormSet, and by ADDOBJECT() the report interface when required, the original form can "pass" the current data session off to the report inerface. Thus the user filters data the way he wants, then calls the report interface for the final step which is to print it out.

FormSets are very cool and for some reason they have a bad rap...

>Does anyone here use formsets much? I understand that a formset could be used if you need several forms to share the same data session but in what instance would this be preferable over instanciating ( <--is that how you spell that darned word?!) the form you want? The only thing I can think of to use formsets for would be if you had a browse form and you wanted to have a seperate form for adding or editing records from the browse.
>
>
>Michael G. Emmons
>VFP Developer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform