필터 지우기
필터 지우기

Directing error messages to GUI textbox

조회 수: 3 (최근 30일)
Katie R
Katie R 2012년 4월 26일
I have code that was originally written to output into the command window and am trying to build an interface for it. I have two text boxes in the interface textbox1 for program status updates and textbox2 for error messages. All of my error handling is written in the form of:
Parse_err = Mexception('verifyInput:InvalidMax', ...
'Invalid max value entered. Please check input file and
enter a valid value. ');
throw(Parse_err)
What would be the best method to go about using to redirect these outputs into my GUI textbox versus the command window?
Thanks

채택된 답변

Image Analyst
Image Analyst 2012년 4월 26일
Try this
warningMessage = sprintf('...... whatever you want.....
set(handles.textbox2, 'String', warningMessage); % Onto GUI
uiwait(warndlg(warningMessage)); % Pop up message.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by