필터 지우기
필터 지우기

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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by