Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I create a control array in a form ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00394366
Message ID:
00394437
Vues:
10
>>> I personally haven't used control arrays
>>> and generally find vfp's built in collections
>>> sufficient for most of my needs. I'm not
>>> sure when you would need one.

Agreed - I use them in VB in cases where, in VFP, subclassing would do the trick. So, in VB, I'd create two command buttons with indexes of 1 and 2, and upon a Click(), run through all the common code, and also use a SELECT CASE to determine the path to take for each particular button. In VFP, I'd create a class, and include all the common code in a method at this (abstract) level. Then, instantiate the button twice, and in each instantiation, overwrite whichever particular methods are specific to the button.

Hope that makes some sort of sense. I have a feeling that VB programmers will work with control arrays much less in coming years, if indeed inheritance is on the way.
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform