Dot indexing is not supported for variables of this type. GUI issues.

조회 수: 6 (최근 30일)
Ryan Flanagan
Ryan Flanagan 2020년 3월 26일
댓글: Ryan Flanagan 2020년 3월 26일
Dot indexing is not supported for variables of this type. I am currently trying to write a GUI and use the get command to extract information, but it is giving me that error message when I try to convert it to a variable.
The full error line is:
Error in NameRedacted>InsertNumberofPaymentsHere_Callback (line 184)
InsertNumberofPaymentsHereBox = str2double(get(handles.InsertNumberofPaymentsHere,'string'));
The lines of code around it read:
function InsertNumberofPaymentsHere_Callback(hObject, eventdata, handles)
% hObject handle to InsertNumberofPaymentsHere (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
InsertNumberofPaymentsHereBox = str2double(get(handles.InsertNumberofPaymentsHere,'string'));
IsNumberEmpty = isempty(InsertNumberofPaymentsHereBox);
I am unsure what I am doing wrong here. Can anyone enlighten me as to the issue?

답변 (1개)

Image Analyst
Image Analyst 2020년 3월 26일
You do not have a static text label or edit text box on your GUI with the name ("tag") InsertNumberofPaymentsHere.
  댓글 수: 2
Ryan Flanagan
Ryan Flanagan 2020년 3월 26일
Nevermind, the issue was that I was running it with the wrong button. This was a non-issue. Thank you for responding though.

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

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by