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

16 views (last 30 days)
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 Comments
Darren Akehurst
Darren Akehurst on 10 Dec 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 on 10 Dec 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.

Sign in to comment.

Answers (2)

per isakson
per isakson on 10 Dec 2019
Edited: per isakson on 21 Dec 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 Comment
Olatunji Omisore
Olatunji Omisore on 10 Jul 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.

Sign in to comment.


JuanRDevelops
JuanRDevelops on 22 Jan 2021
Edited: Walter Roberson on 22 Jan 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.

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!