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

조회 수: 13 (최근 30일)
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
Darren Akehurst
Darren Akehurst 2019년 12월 10일
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 2019년 12월 10일
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.

댓글을 달려면 로그인하십시오.

답변 (2개)

per isakson
per isakson 2019년 12월 10일
편집: per isakson 2019년 12월 21일
"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
Olatunji Omisore
Olatunji Omisore 2020년 7월 10일
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.

댓글을 달려면 로그인하십시오.


JuanRDevelops
JuanRDevelops 2021년 1월 22일
편집: Walter Roberson 2021년 1월 22일
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.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by