how to resolve the 'dot indexing not supported for variables of this type' error?

14 visualizaciones (últimos 30 días)
I am using Matalb 2019b. I have a guide figure that I when I save it I get the error as below. The guide figure has been used at lot but since upgrading I now get the error. I can edit and update the associated .m file with no probelms.
The lines of code in the guidefunc are as follows:
layout_ed = getappdata(fig, 'GUIDELayoutEditor');
frame = layout_ed.getFrame;
Any suggestions will be most appreciated
  4 comentarios
Darren Akehurst
Darren Akehurst el 10 de Dic. de 2019
It has a lot of information II would prefer to keep private. Any suggestions on how to approach the issue would be really appreciated though
Walter Roberson
Walter Roberson el 10 de Dic. de 2019
It needs a long debugging session. You have to trace the readSavedFigure call: the first parameter to it should be a non-empty layout editor object that would then get stored into the GUIDELayoutEditor property of the figure within the newGuideFig function near line 2368. You need to figure out whether a valid value is getting set there; if not then you would need to trace back to find out what is calling guidefunc with incorrect parameters or where the value is disappearing to. If a valid value is getting set, then it becomes a matter of tracking down why the value is disappearing.

Iniciar sesión para comentar.

Respuestas (2)

per isakson
per isakson el 10 de Dic. de 2019
Editada: per isakson el 21 de Dic. de 2019
"I would prefer to keep private" Two alternatives remain
  • Make a Minimal working example and upload it here
  • Start debugging. Set a breakpoint at the line 1224. Invoke your code. When the execution halts at 1224 inspect the values of fig and layout_ed. Share your findings here. See Walter's comment.
And see
  1 comentario
Olatunji Omisore
Olatunji Omisore el 10 de Jul. de 2020
Hi, I had similar problem and have to start the GUI from fresh each time. Kindly find my files for assisstnace and hope ypu can guide me to what is causing this problem.
Thanks.

Iniciar sesión para comentar.


JuanRDevelops
JuanRDevelops el 22 de En. de 2021
Editada: Walter Roberson el 22 de En. de 2021
A solution I gathered from another question. This worked for me
For your GUI, you should have script.fig and script.m files
Rename script.m to something like script_.m
Work on your figure with GUIDE, and then save it. Rename your m-file to script.m again.

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by