Callback function in guide
Afficher commentaires plus anciens
Hello guys, I made a GUI by making use of 'guide'. My GUI make cell array named 'shapes' when pushbutton51 is pressed, Then the 'newshapecreated' is triggered(I made this as a callback function) And this callback function should process with the 'shape'. But it can't read the 'shape'. The matlab says 'Input argument "handles" is undefined.'
What is the problem with my code?
*function pushbutton51_Callback(hObject, eventdata, handles)
shapes = {};
handles.shapes = shapes;
guidata(hObject, handles);
% below is callback function newshapecreated;
function newshapecreated(hObject, eventdata, handles)
shapes=handles.shapes;*
Réponses (1)
Azzi Abdelmalek
le 9 Juin 2013
The second function should be
function newshapecreated(hObject, eventdata, handles)
shapes=handles.shapes
7 commentaires
Seombeom Kim
le 9 Juin 2013
Azzi Abdelmalek
le 9 Juin 2013
What is
shapes = {};
Azzi Abdelmalek
le 9 Juin 2013
Maybe, you should make some initialization in opening function
Seombeom Kim
le 9 Juin 2013
Azzi Abdelmalek
le 9 Juin 2013
Ok, how the function newshapecreated is triggered? and what represent this callback function?
Seombeom Kim
le 9 Juin 2013
Modifié(e) : Azzi Abdelmalek
le 9 Juin 2013
Seombeom Kim
le 9 Juin 2013
Catégories
En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!