How can I save the handles of a GUI in other .m file?
Show older comments
I have a GUI, and when the user click in one axes I call this function:
set(handlesStacked(:),'ButtonDownFcn', {@axes2_ButtonDownFcn, handles});
As you can see I send the handles, and this function is defined in other .m file:
function axes2_ButtonDownFcn(hObject, eventData, handles)
global position;
...
coordinates=get (gca, 'CurrentPoint');
handles.coordinates=coordinates;
...
guidata(hObject, handles);
end
Everything work but last line: 'guidata(hObject, handles);' which doesn't save the handles... Who could I do to save them inside the file?
Thanks
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!