Override GUI from appdata
Mostrar comentarios más antiguos
Hello,
I have trouble in passing GUI data and variable data between two GUI.
I have two separate GUIs, GUI1 GUI2. In GUI 1, I call GUI 2 and set multiple radio buttons and also load some text files. In GUI 2, I put a code that save data of GUI 2 to the root as following setappdata(0,'popupex',handles);
After I close GUI 2, I recall GUI 2 from GUI 1. In this GUI 2 opening moment, I want to load the savedappdate at the root and override the stored GUI and variable data into GUI 2 but I have been failed.
What I was trying is put the following code at the OpeningFcn of GUI 2. I was hoping as soon as prevGUI is stored in hObject, It can recall all the GUI data and variable data I had before I close first GUI2 and override them into 2nd opened GUI 2.
prevGUI=getappdata(0,'popupex');
if(isempty(prevGUI)==0) % when there is prev. GUI data from popupex
guidata(hObject,prevGUI)
end
Please give me some advice to get this done. Thank you
2 comentarios
Geoff Hayes
el 17 de Nov. de 2016
Kyoungchoul - are you using GUIDE to create your GUIs? If so, wouldn't the
guidata(hObject,prevGUI)
overwrite any of the handles to the controls on the new GUI? (So not just data that you may have saved yourself but the handles to the controls too.) Is this the problem or is prevGUI empty?
Kyoungchoul Koo
el 17 de Nov. de 2016
Respuestas (0)
Categorías
Más información sobre App Building en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!