Undefined function or variable 'figure1_S​izeChanged​Fcn'.

4 visualizaciones (últimos 30 días)
I tried resize my app using the Tools --> Gui Options --> Resize behavior --> Other (Use SizeChangedFCN). But, I changed my opinion and I decided to build my app without the resize. After I choose no resize my app, it started to show when my program run. Now, my program is this option Tools --> Gui Options --> Resize behavior --> Non-resizable
All error:
Undefined function or variable 'figure1_SizeChangedFcn'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in EDUFIS1 (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)EDUFIS1('figure1_SizeChangedFcn',hObject,eventdata,guidata(hObject))
Error using matlab.hg.internal.openfigLegacy (line 117)
Error while evaluating Figure SizeChangedFcn

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 24 de Dic. de 2018
I followed your steps and can recreate the problem. The issue is related, but there is a different way to fixing it, as you really don't want the callback function anymore. The resize callback gets added as the SizeChangedFcn in the property inspector. So even after changing the gui resize option and deleting the function from your code, there is still a handle to the resize callback function listed in the properties of the figure window.
To fix it, rt click on the figure and select "Property Inspector"
Scroll down until you see the SizeChangedFcn property. On the right you will see an anonymous function handle that looks something like this:
Delete everything to the right of SizeChangedFcn.
Close the property inspector and save the Figure file.
Run your code to verify the error has gone away.

Más respuestas (1)

Cris LaPierre
Cris LaPierre el 18 de Dic. de 2018
This sounds a lot like this question. Is the issue the same?
  2 comentarios
Cris LaPierre
Cris LaPierre el 24 de Dic. de 2018
Editada: Cris LaPierre el 24 de Dic. de 2018
Sorry - Linked to the wrong post. I meant to link to this one.
There, the callback is added to the properties of the button, so deleting the button deletes all it's properties, fixing the issue (the other option is to readd the code for the callback).
Deleting the figure is not really an option, so we instead need to edit the properties.

Iniciar sesión para comentar.

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by