Editing superclass properties from subclasses
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Subclass Definition en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!