Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refactoring ?
Message
De
29/12/2002 08:39:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
27/12/2002 19:16:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00736230
Message ID:
00736395
Vues:
16
>I am writing a class that consists of an option group in a container. This option group asks the question All: Yes / No where a No answer brings up a moverlistpair form and allows the operator to select a list of values to include.
>This option group will be the parent of a number of different children which will draw their options from a number of different sources. Up to this point the hosting form has held two arrays one for all values, and one for the selected values, but since its possible that the option group could occur more that once on a form (for instance all clients: Y/N and All Projects Y/N). I should also say that I'm using codemine which has a fully objectified data environment class.
>My question is this: Where is the appropiate place to put an array that will be referred to by code outside the class? Does it obfuscate the code to place it in the option group?
>
>TIA
>Mike

Since the selection may occur more than once on a form, I would create a class (Container) that includes your selection logic, including the All: Yes / No part, and the OptionGroup. It seems you already have this. The logical place to place the array(s) would also be in this same Container class, IMO.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform