How to assign whole 'app' variables at App Designer

2 Ansichten (letzte 30 Tage)
Ren Ren
Ren Ren am 14 Jan. 2019
Recently, I developed one App thorugh appdesigner. One of function I want to develop is to save all the varaibles and UI selection of current App and then recover them for the later quick setting up. However, I found it cannot directly assign 'app = app_save' (where I save 'app' as .mat file previously, then load as app_save). The only way to do this is to assigh all the variables and members of 'app' respectively, but I have too many variables and members and it is stupid to do this. I was wondering if there is a easy way to update 'app' as whole insrtead of individual members. Thanks.
%%%% in main app window%%%%%%%%%
function Revocer_app(app,app_save)
app.TopologyListBox.Value= app_save.TopologyListBox.Value; % can work
app = app_save; %does not work
end
%%%%%%%% in dialog app window%%%%%%%%%%
function RecoverHistorySetupButton_2Pushed(app, event)
Revocer_app(app.main_app1,app.main_app_save);
delete(app);
end

Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by