Dear All,
I am currently working on a GUI using Matlab GUIDE.
I work with the handles to store some data to be available for all callbacks.
But here comes my problem.
When I introduce additionnal functions into the different callbacks and if those functions try to add specific data to the handles, I have a feeling that the handles is saved only after the callback terminates.
Here is my concrete example:
function button1_Callback(hObject, eventdata, handles)
myFunction(handles);
myOperation = handles.myData + 1;
function myFunction(handles)
handles.myData = 1;
guidata(gcbo, handles);
If I proceed this way, I obtain the following error:
Reference to non-existent field 'myData'.
I partially solved the problem by waiting the callback to be closed. And then myData is indeed available for further processing.
My question is therefore the following:
Am I doing the data storage and save right? Is there a way to make myData available already inside the callback (as it is done in my example)?
I hope I was clear in the definition of my problem, in any case I can provide further information upon request.
Thank you very much for your help and have a nice day.
David N.