H must be the handle to a figure or figure descendent??
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone!
My problem is:
I have twos GUIs, GUI1 and GUI2.
GUI2 is sub - GUI of GUI1 that mean when i click on any component in GUI1, GUI2 will be opened
And, i want to use data in GUI1 for GUI2. i use code below in function GUI2_OpeningFcn(hObject, eventdata, handles, varargin) of GUI2
function GUI2_OpeningFcn(hObject, eventdata, handles, varargin):
hgui1 = findobj('Tag','gui1') % i set 'Tag' for GUI1 is "gui1'
if ~isempty(hgui1)
% get handles and other user-defined data associated to Gui1
gui1data = guidata(hgui1); % Store data from hgui1 to gui1data handle
end
guidata(hObject, handles);
when GUI2 runs, matla returns:
Error using guidata (line 87)
H must be the handle to a figure or figure descendent.
I don't know why?
Could you help me?
Please!
0 Kommentare
Antworten (1)
Walter Roberson
am 28 Dez. 2018
We have been discussing this in https://www.mathworks.com/matlabcentral/answers/11738-set-handles-of-another-gui#comment_654592 where I am waiting for your response on some debugging steps.
At the moment the difficulty is that your hgui1 is returning multiple figures. I need more information from you to figure out why it is happening.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!