colorbar no longer supported in GUIDE 2020a - quick fix?
2 次查看(过去 30 天)
显示 更早的评论
I'm getting the following message when I open my .fig file in GUIDE (Matlab 2020a, Windows 10):
What's strange is that I wasn't receiving this error before in 2020a so I'm not sure what changed.
I understand GUIDE will no longer be supported but is there an equivalent object or configuration for colorbar I can use to prevent this error for now?
I can't make any changes to the file/GUI as a result so I'm stuck with the current configuration of the .fig file for my app.
When I do make a change and save the .fig and run the associated .m file, I get the following error:
Reference to non-existent field 'axes1'.
handles.axes1 being what I was using as the colorbar reference.
10 个评论
Adam Danz
2020-9-28
I've added that code (and some random numbers to defining missing vars) to a GUIDE gui opening function in r2020b. It creates the colorbar and it's displayed as expected. I opened the fig in GUIDE after doing this and everyting was OK. I opened the fig in GUIDE while the gui function was paused in debug mode and still, no problem.
Is it correct that this warning dialog appears only when you open the GUIDE figure in GUIDE and it appears every time, even if it's the first thing you do after restarting Matlab?
Steven Lord asked an important question to which we do not have an answer. What version of Matlab was this GUI written in?
采纳的回答
更多回答(1 个)
Walter Roberson
2020-9-28
this dialogue only appears when I open the .fig file in GUIDE (i.e. right clicking on the file in Matlab environment and selecting Open In GUIDE)
Don't Do That.
GUIDE-created .fig files are designed to only be opened from within the corresponding .m file. The .m file initializes the environment and then opens the .fig file and the .fig file needs the environment to have been initialized.
6 个评论
Steven Lord
2020-9-29
At this point, I agree with Adam Danz: I think further investigation is going to require seeing the figure and code files for this GUI. If you don't want to or can't post them on Answers, please contact Technical Support directly (using the telephone icon in the upper-right corner of this page) and ask the Support staff for assistance with this issue.
另请参阅
类别
在 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!