Save handles in GUI with Timer

1 vue (au cours des 30 derniers jours)
Andrew
Andrew le 11 Avr 2014
Réponse apportée : Andrew le 14 Avr 2014
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

Réponses (1)

Andrew
Andrew le 14 Avr 2014
Thanks to all! Solution is found!

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by