How can I properly communicate and edit real-time with master and child structs using GUIDE?
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hey, first time poster! This site is very useful for asking questions. I'm doing an assignment for my engineering class (we get to figure out a lot of stuff on our own) and I have been experimenting. Currently, I have a master GUI or parent GUI that has 4 "kids". These kids modify values in the parent struct as well however I am not sure how to properly modify these values. Only one GUI is visible at a time, however.
Originally I thought simply calling the parent and kids by using:
WEIGHTSANDBALANCE('CALLBACK',hObject,eventData,handles,...)
, things like that. However, this always brought the Singleton to the front even when Visibility was set to off.
I decided that the next best thing to do was to have the parent simply have child structs inside the structure itself. This means to modify children it'd be something around
set(handles.WeightsAndBalanceHandles.text,'String','Testing stuff, man')
This works perfectly however the child cannot talk to the parent because it causes a recursion issue and MATLAB yells at me. Is there any way around this? Perhaps there's some way to do this properly that I don't understand? Thanks
댓글 수: 7
Walter Roberson
2013년 4월 14일
GUIDE is not designed to be able to support multiple GUI.
Ethan
2013년 4월 15일
Walter Roberson
2013년 4월 15일
Does the assignment require that you use GUIDE ?
Jing
2013년 4월 16일
One way I can think of is to make both parent and child structs global, which can be achieved by using setappdata(0,...) to have them stored as appdata on root.
Ethan
2013년 4월 16일
Jing
2013년 5월 3일
Yes, GUIA is the name for handles in your case, once you change the value for GUIA, it'll reflect changes.
답변 (1개)
Yao Li
2013년 4월 16일
0 개 추천
I'm not quite sure what you want. But can your problem be fixed if some variables are saved to the 'base' workspace? If it works, use assignin() to assign the variables to the workspace and use evalin() to import the varaibles from workspace to the callbacks
이 질문은 마감되었습니다.
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!