H must be the handle to a figure or figure descendent??
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Walter Roberson
il 28 Dic 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 Commenti
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!