Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object source code.
Message
 
À
22/06/2000 15:56:44
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00382805
Message ID:
00383435
Vues:
14
Cindy,

The idea is to fully define each object before it is used in a conatiner. Late composition says that the very last thing done before the composit class is used is to assemble the components into a container. Once in the container nothing is added to the contained objects. No code, nothing!!!

The problem with early composition is that when you subclass the container with its contained objects you have objects that show no code, but they do not originate from a specific class that has the code.

For example, imnagine using picture buttons in a form made by the form wizard. You see an Edit button in the container. You look in the click and see no code. So you go to the picButtons class and look in the click of the contained edit button, still no code. So you check the class of the edit button in the picbuttons class and find it is CommandButton, hmmm that is the VFP base class for buttons. So where is the code? You need to edit the parent class of picbuttons which is txtbuttons to get the code.

Now imagine you want txtbuttons, but without the Search button. So you subclass txtbuttons and remove the search button. Oops, you cannot remove an object that is part of the parent class. Ok, we'll just make a new container and put in the buttons we want. Oops again, all of the behavior code is in the txtButtons class and not in individual button clases.

Does this get you thinking along new lines?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform