Non-Handle Classes with events and listeners

Hi
I do think I know the answer to this but would like to clarify in case I missed anything.
Is it only handle classes that can implement events and listeners? From the documentation I read, it seems that handle classes inherit the 'notify' and 'addlistener' methods.
So if my understanding is correct then value classes can never define events or notify listeners?
Regards, Phil

 採用された回答

Phillip
Phillip 2014 年 11 月 27 日

0 投票

For the sake of completeness I will answer the question myself.
There is no direct way of using 'notify' and 'addlistener' without the class being a handle class. To use the official matlab Events and Listeners you must ensure that your class is a handle class.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

質問済み:

2014 年 11 月 22 日

回答済み:

2014 年 11 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by