Override GUI from appdata
이전 댓글 표시
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
Geoff Hayes
2016년 11월 17일
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
2016년 11월 17일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!