Editing superclass properties from subclasses
古いコメントを表示
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?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Subclass Definition についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!