Undefined function or variable 'figureExi​tButton_Si​zeChangedF​cn' in Guide

I got this error at one point after changing size and position of my gui with set(n,'units',.... The error is:
Undefined function or variable 'figureExitButton_SizeChangedFcn'.
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in Messung (line 42) gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)Messung('figureExitButton_SizeChangedFcn',hObject,eventdata,guidata(hObject)) Error using matlab.hg.internal.openfigLegacy (line 117) Error while evaluating Figure SizeChangedFcn.
The Gui still works fine with this error, but I can't use uiwait anymore with this error, because it gives me a new error and just stops completely: Error using uiwait (line 48) Input argument must be of type figure
Did someone already had this error or knows how I can solve this or work around this?

8 件のコメント

Geoff Hayes
Geoff Hayes 2018 年 3 月 14 日
Anna-Malin - how have you created your GUI? With GUIDE, AppDesigner, or programmatically?
amship
amship 2018 年 3 月 14 日
Hey- with GUIDE
Geoff Hayes
Geoff Hayes 2018 年 3 月 14 日
But you are changing the size and position of the GUI programmatically from the command line or within the GUI itself (in response to some event)?
amship
amship 2018 年 3 月 14 日
Sorry about the confusion. I changed it from the command line and changed in guide in GUI options 'Resize behaviour' to 'Other (Use SizeChangedFcn)'. After the error occured I changed the setting back and don't change size and position any more. But the error still occur.
Adam
Adam 2018 年 3 月 14 日
If you right click on the figure in GUIDE and look at the Property Inspector, what is the SizeChangedFcn?
amship
amship 2018 年 3 月 14 日
the SizeChangedFcn is: @(hObject,eventdata)Messung('figureExitButton_SizeChangedFcn',hObject,eventdata,guidata(hObject))
Geoff Hayes
Geoff Hayes 2018 年 3 月 14 日
try deleting this property value so that there is no reference to figureExitButton_SizeChangedFcn
amship
amship 2018 年 3 月 14 日
I found it. I had to delete the SizeChangedFcn in the Property Inspector and it worked. Unfortunately uiwait is still not working, but I will figure it out. Thanks for your help.

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2018 年 3 月 14 日

コメント済み:

2018 年 3 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by