Handles variable in GUIDE is not updating
이전 댓글 표시
Hi, everybody.
I already looked for an answer throughout content in MatLab website, but I didn't found a solution, even that there are some questions with this subject like in: http://www.mathworks.com/matlabcentral/newsreader/view_thread/259633 It didn't is the solution (and I read all the guidata's doc, like suggested). My problem is that I recorded an information in the "handles" structure within one GUIDE's function and I can't retrieve this information in another function.
And as soon as I execute the GUI I get this error message: http://s11.postimage.org/5trvp5c83/Captura_de_tela_2012_08_06_a_s_12_25_55.png
I tried to change the UIWAIT variable (<http://paste.ideaslabs.com/show/6QQr4NqA4A>), to wait the user close the window, after click in button, and then try to take the handle variable. But it doesn't work too, like you can see here: http://s7.postimage.org/5s6lk8tyj/Captura_de_tela_2012_08_06_a_s_12_31_31.png
Please, I need to finish a work and I can't because of this issue. Any help will be welcome. Thank for your attention.
댓글 수: 1
Seyhan Emre Gorucu
2012년 8월 6일
I had the same problem. finally, I put all the functions inside the main function. Now it works well.
답변 (1개)
Sean de Wolski
2012년 8월 6일
편집: Sean de Wolski
2012년 8월 6일
It is not updating because you are calling guidata with hObject in the pushbutton's callback. hObject in the pushbutton's callback will be the pushbutton, not the figure.
Thus you would want:
guidata(handles.figure1,handles) %or handles.(whatever the tag for the figure is)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!