フィルターのクリア

How to execute a few callbacks (in order) from another callback in App Designer?

2 ビュー (過去 30 日間)
Ahmed Hassan
Ahmed Hassan 2019 年 5 月 16 日
コメント済み: Ahmed Hassan 2019 年 5 月 17 日
Hello,
I want to execute a few button-pushed callbacks inside a bigger button-pushed callback. But, I want them to be executed at spesific time (after some other computations are done) and in specific order. Here is a sample code to further explain my question.
properties (Access = public)
%my properties are defined here
end
methods (Access = private)
% Button pushed function: Function1
function Function1ButtonPushed(app, event)
%execute Function1 callbacks
end
% Button pushed function: Function2
function Function2ButtonPushed(app, event)
%execute Function2 callbacks
end
% Button pushed function: Function3
function Function3ButtonPushed(app, event)
%execute Function3 callbacks
end
% Button pushed function: Function4
function Function4ButtonPushed(app, event)
%Some computations here
%need to execute Function1 callbacks
%need to execute Function2 callbacks
%need to execute Function3 callbacks
end
  3 件のコメント
TADA
TADA 2019 年 5 月 16 日
Rik's idea should work,
a more elegant solution would be to put the functionality of the callbacks in separate private functions, and call those, that way, you don't need to pass the "dirty" event data which is very ui event specific and is not necessary for most functionalities either way.
Ahmed Hassan
Ahmed Hassan 2019 年 5 月 17 日
That worked! Thank you Rik and TADA.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by