Events Listening, Callback functions
古いコメントを表示
Hello,
I'm wondering if it's possible to bind the excecution of a listener to an condition? for example : assume we have a system of three users :user1,user2,user3.
-user1 and user2 trigger event 'Hello_Request', which user3 is listening to so:
user3 = addlistener([user1,user2],'Hello_Request',@callback1)
-user3 responds with 'Hello_Response', which user1 and user3 are listening to. so:
user1 = addlistener([user3],'Hello_Response',@callback2)
user2 = addlistener([user3],'Hello_Response',@callback2)
Now my question: Is there a way to condition the execution of user1 and user2 that user3 respond s just to the one who send a 'Hello_Request'? I can use different events since my system gets a large number of user which can actually variate.
Thanks in advance for your support!
Bolivar
採用された回答
その他の回答 (1 件)
Bolivar
2013 年 7 月 25 日
0 投票
2 件のコメント
Daniel Shub
2013 年 7 月 25 日
It would be helpful to myself, and possibly others, if you could post some simplified code showing what you ultimately do.
Bolivar
2013 年 7 月 29 日
カテゴリ
ヘルプ センター および File Exchange で Entering Commands についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!