フィルターのクリア

Unable to find a valid PropName for waitfor with a Matlab app

3 ビュー (過去 30 日間)
Greg
Greg 2024 年 6 月 8 日
回答済み: Gregory Crabtree 2024 年 6 月 9 日
Using app designer, I have a main app that calls a form. From the main app, I instantiate the form
app.FormApp = FormApp(app);
I can halt execution by waiting for the form to be deleted
waitfor(app.formApp);
My desire is to keep the form open and repopulate from a loop in the main app. However, setting a public property on FormApp and calling it fails. I.e.
waitfor(app.formApp, app.formApp.pauseLoop, false)
throws "Error using waitfor
Invalid property." I've tried lots of combinations trying to get a property of the FormApp that waitfor will use. Any help appreciated.
I'm using R2023b Update 5 on Windows 10.

回答 (1 件)

Gregory Crabtree
Gregory Crabtree 2024 年 6 月 9 日
I figured it out:
Use a property of a control on the called form. In my case there is an "AcceptNextButton" button. I can set values on the form, then click the button to change the 'UserData' value from 0 to 1. HTH someone else.
waitfor(app.FormApp.AcceptNextButton,'UserData',1)

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by