필터 지우기
필터 지우기

WindowButtonDownFcn tries to access a callback function that no longer exists

조회 수: 3 (최근 30일)
J.S.
J.S. 2018년 7월 11일
댓글: J.S. 2018년 7월 11일
I have been working with the WindowButtonDownFcn. At one point, I implemented
set(myfig_h,'WindowButtonDownFcn',@seeFit)
where seeFit is my callback function. Later, I deleted this line of code, and moved the seeFit function to a different folder because it was not needed. Now, whenever I try to run my code, I get the error
Undefined function 'seeFit' for input arguments of type 'matlab.ui.Figure'.
Error while evaluating Figure WindowButtonDownFcn
How do I prevent this from happening? Thank you very much!

채택된 답변

Rik
Rik 2018년 7월 11일
Apparently the line of code is still there. Either it is saved in a .fig file, or you didn't actually delete/comment the line.
You can prevent this by explicitly assigning another function to it (or an empty one).
  댓글 수: 3
Rik
Rik 2018년 7월 11일
And explicitly setting the WindowButtonDownFcn doesn't solve this? If that is the case, try restarting Matlab (and maybe even your OS). If the problem persists, I think this would rise to the level of a bug that you should contact Mathworks with, unless I'm missing something.
J.S.
J.S. 2018년 7월 11일
I found the seeFit reference; it was buried in a function that was being called. Thanks for your help!

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

추가 답변 (0개)

카테고리

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