Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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 comentarios
TADA
TADA el 16 de Mayo de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by