Information générale
Catégorie:
Programmation Orientée Object
I tried to format that on the screen, but it got garbled.
Let's say you have a container and put controls in it and define it as a class. As you note, changes made later to the controls at the class level do not propagate to existing instances of the controls.
In order to do that, create each object as a separate class. Make the composite object when instantiating. Then, when you change any property or method of a class, it will be propagated to all existing instances.
This is standard operating procedure for containers. With that knowledge in mind, I'm much more inclined to do the 2nd process for flexibility later on, but you do lose a bit of convenience.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement