Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inheritance loses properties/methods
Message
De
19/07/2000 16:52:30
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, États-Unis
 
 
À
13/07/2000 15:20:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00391738
Message ID:
00394565
Vues:
9
>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.

Are you saying I should drop a container on a form, and then the components in there, for each form?

Or do you mean I can continue to make this composite class before hand, but must make sure that I make and use a subclass of all the components that go into this container. That way any changes in the future should be done at the subclassed component, and then that WILL trickle down to all instances of the composite class wherever it is...??

If it's the latter, I can understand that a bit better, thanks. It's unfortunate to think though.. that if I want to make (for instance) a composite class that consists of 7 buttons lined up a certain way, that i'd have to make 7 different subclasses of the button object first, and then drop one instance each into the composite class, just incase I want to change a color property some day... Am I correct?

Thanks,
Dustin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform