This is a pretty large app. It would be somewhat painful if I have to individually identify each variable that I what to share
Equivalent to guidata in App Designer
11 次查看(过去 30 天)
显示 更早的评论
I converted a GUIDE based applicatoin to App Designer. When I created a new variable in a callback, I would add it to handles. Then at the end of the callback I would issue a guidate command so that my new variable was accessible in other callbacks of the GUI. Example
handles.cpu_str = cpu_str;
guidata(myapp,handles)
The help tells me to not use guidata except with GUIDE and .fig. So how do I make these variables available? The help advised me to change my handles to app.handles, but this had no effect. I tried making a handles a public property. How should I do this
3 个评论
Walter Roberson
2022-3-30
Can you use the migration tool? https://www.mathworks.com/help/matlab/creating_guis/differences-between-app-designer-and-guide.html
采纳的回答
William Day
2022-3-31
2 个评论
Jeffrey Topp
2023-11-9
I have a similar issue. I created an app in App Designer which has a button that calls a script. How do I access the data (equivalent to guidata) from inside my script? I'd rather not pass the status off all the checkboxes and what not into the script.
Walter Roberson
2023-11-10
编辑:Walter Roberson
2023-11-10
You would have to make sure that all of the properties of the app are Public so that you can examine them off of app. from inside your script. If you want to prevent the script from changing the properties, you would need to mark the properties as not having write access.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!