App designer, label text is not updated
이전 댓글 표시
Hello,
I'm working on an app in Matlab App Designer and I noticed that my calls to change the text of a label or not executed properly. Clicking on a button starts a function, which in turn calls several other functions. I want to give the user some feedback during the function so it is clear that the script didn't crash. Here is my example code:
function do_several_things(app)
app.Label_status.Text = 'Status: Now doing x...';
do_x();
app.Label_status.Text = 'Status: now doing y...';
do_y();
app.Label_status.Text = 'Status: now doing z...';
do_z();
imshow(app.some_img, [], 'Parent', app.ImMain);
app.Label_status.Text = 'Status: Done...';
end
When I run the script, only the last message "Status: Done..." is shown. The functions take around 10 seconds, so I am sure that the other text messages are not shown. I also tried commenting out the last text update and the imshow command, then the script does not display any messages while running and after having finished displays the third text "Status: no dowing z...". Commenting out more showed the same pattern. Why is the text not updated at the correct moment? Is a label the wrong object for my aim and if so what other options do I have?
edit: I am using Matlab 2018a
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!