Clear Filters
Clear Filters

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

2 views (last 30 days)
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 Comments
TADA
TADA on 16 May 2019
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.

Sign in to comment.

Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!