Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Why does GUIDE disassociate the contents of functions?

5 ビュー (過去 30 日間)
Trevor Fields
Trevor Fields 2018 年 6 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
So I'm using GUIDE for the first time, and everything is going smoothly, except this issue. Occasionally, when I run the figure to update the m file with a new callback or when I save the m file, the contents of all the callbacks no longer associate with the callbacks.
Before:
After:
Buttons don't refer to any callback or do anything, running the figure again doesn't change the m file, but the property manager for each button hasn't changed in any way. And I am aware the shown function isn't a button callback, but it's the same situation for every function in the file.
Steps that didn't help: Copy-Pasting into a new file. Deleting the m file and running the figure. Starting over from scratch (it just happened again).
Any help either in fixing this problem or preventing it from happening again is greatly appreciated!

回答 (1 件)

Steven Lord
Steven Lord 2018 年 6 月 8 日
If you need to rename a GUIDE-generated GUI, you should use the Save As menu item inside GUIDE itself to do so. When you do that, GUIDE will update the references to the GUI in the code and the properties of the graphics objects stored in the .fig file to reflect the new name.
  3 件のコメント
Trevor Fields
Trevor Fields 2018 年 6 月 13 日
The issue is still occurring, and more frequently, and I am using the Save As menu now.
Steven Lord
Steven Lord 2018 年 6 月 13 日
Please send a sample GUI (both the .fig and .m files) with which you have experienced this "disassociation" behavior to Technical Support for further investigation. You can use the Contact Us link in the upper-right corner of this page to contact Support.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by