Information générale
Catégorie:
Gestionnaire d'écran & Écrans
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement