How to assign whole 'app' variables at App Designer

2 ビュー (過去 30 日間)
Ren Ren
Ren Ren 2019 年 1 月 14 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by