Save handles in GUI with Timer

Hello community!
I've got a GUI with timer in the OpeningFcn
handles.timer = timer(...
'ExecutionMode', 'fixedRate', ... % Run timer repeatedly
'Period', 2, ... % Initial period is 1 sec.
'TimerFcn', {@checkNewFiles2,hObject}); % Specify callback function
handles.x=1;
guidata(hObject,handles)
function checkNewFiles2(hObject,eventdata,handles)
handles=guidata(handles);
handles.x=handles.x+1;
guidata(handles, handles);
But when I'm trying to save handles in the last row, I've got an error:
Error while evaluating TimerFcn for timer 'timer-51'
H must be the handle to a figure or figure descendent.
How can I save my handles?
Thanks in advance!
Andrew

답변 (1개)

Andrew
Andrew 2014년 4월 14일

0 개 추천

Thanks to all! Solution is found!

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

질문:

2014년 4월 11일

답변:

2014년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by