Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which Event/Method should I use?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00499379
Message ID:
00500517
Vues:
23
>Craig -
>
>Can you elaborate on this a bit? In particular, my questions are:
>1) Am I correct in assuming that when you say that the only thing that should know about the textbox is the form, you really mean "the parent container", which in this case is the form? Or should the form know about all the objects it contains?

The parent container.

>
>2) What is the OOP principle which suggests that only the parent container should know about the textbox? If OOP is based on objects messaging one another, why is it inappropriate for two objects in the same container to know about each other?

Data Hiding
Loose coupling

If one object knows about another object at the same level (for example two objects on a form), then they are tightly coupled. However, because the form is the container of the two objects, by default it knows about both of them.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform