Editing superclass properties from subclasses
Afficher commentaires plus anciens
Hi!
I have a question related to the Matlab example http://www.mathworks.com/help/matlab/matlab_oop/a-simple-class-hierarchy.html. For testing I use:
ds = DocSavings;
db = DocBond;
I can change the superclass property "Description" with
ds.Description = 'test';
However, listing "db" properties shows an empty "Description" string. Is there a way to synchronize superclass properties? Is using events and listeners of handle classes the only possible way?
Maybe: Another way is to use the subclasses as normal classes and define objects of these classes as properties of the former superclass?
Is there a better solution?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Subclass Definition dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!