App Designer: How to refresh Text or Num field after assigned new value
1 次查看(过去 30 天)
显示 更早的评论
When I launch my App.mlapp I would like to insert in a numeric field the last value displayed before I close my App. But the field does not refresh and the new value does not appear. How can I do ?
function Test_App_Startup_CallBack(app)
clearvars –global;
load('C:\PQATestBenchNavigation\50 - Steering Wheel TestBench\defaultparameters.mat','testparameters');
global testparameters;
testparameters = importdata('defaultparameters.mat');
app.Fw_VersionEditField.Value = testparameters.fwVersion;
0 个评论
回答(2 个)
C B
2021-10-6
编辑:C B
2021-10-6
Issue can be in 2 things
1)App edit field not refreshing
I dont think this is the case
2) testparameters not getting updated?
can you try adding one line to get to know if testparameters has right value?
msgbox(testparameters.fwVersion)
If testparameters.fwVersion is not str
msgbox(num2str(testparameters.fwVersion))
Please check and let me know output of msgbox then we can debug further
2 个评论
C B
2021-10-6
function Test_App_Startup_CallBack(app)
this is start up fucntion?
can your share mat file if possible?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!