Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Early binding?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00395657
Message ID:
00399473
Vues:
27
>>>I'd say it's two different grids on the same form, possibly in a pageframe.
>>
>>That could be an option, but either way trying to get one form to be capable of 2 different things, but only ever use 1 in its life time, seemed over complicating.
>
>I did'nt pick up on the fact that her form would have only one of the grids in its lifetime. Mine might use all three when it's loaded. The method for instantiating the stuff in the pages comes from Booth and Sawyer's Effective Techniques book.

Hi Bret,

My application in question could operate in two different modes: Parcel Processing or Transaction Processing. The operations are similar, but not identical. My colleague, who started this application, used this technique:
In the Main program declare parameters with parameters statement (not lparameters), so they would be seen in Form Load method. Set appropriate form properties, caption, etc. depending on parameter. In Init method he removed one of the Grid, which was not used for passed mode. Therefore this form expected, what data table has all fields. Lately I found, that it's not always true, e.g. table for Transaction may have different set of fields than table for Parcel Processing. Since form was already designed and had quite complicated code (sometimes conditional), I decided, that the easiest thing to do would be save grids as class, remove both of them from the form, and in Init instantiate the appropriate grid. This idea works. I agree with Mike, that two forms would simplify the process. I also agree with Larry, that two forms would make development stage harder... Anyway, my current implementation is 2 grid classes. And it's fine.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform