Borrar filtros
Borrar filtros

Working with Apps and classes

4 visualizaciones (últimos 30 días)
Paul
Paul el 9 de Mzo. de 2017
Comentada: Astarag Chattopadhyay el 14 de Mzo. de 2017
Hi,
I have recently discovered the Matlab APP and love it. However I'm not very good at Object Orientated Programming (OOP) yet so I was looking for some help with dealing with some legacy code.
I would like to use a push button in the App to call an object in the workspace. But I'm not entirely sure how to to it with the syntax and abilities of OOP in Matlab.
So my Legacy code calls a property of an ojbect and querys it.
e.g
if true
% code
x=function1(Instance.Property,string,b,c)
query(Instance.Property,'string')
x=b+c
end
end
I have a push button call in the app set out like this:
if true
% code
methods (Access = private)
function Buttonpress1(app, event)
end
end
end
I only have on instance of the class if that helps?
Thanks for any help!
Paul
  1 comentario
Astarag Chattopadhyay
Astarag Chattopadhyay el 14 de Mzo. de 2017
Are you aware of the callbacks that are used to accomplish any action when an event occurs? Like in this case you can associate a callback with your push button and add your piece of code in the corresponding callback function. You can refer to this link for more details about callbacks: https://www.mathworks.com/help/matlab/creating_guis/app-designer-callbacks.html

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by