How can callbacks from a "Main GUI" access data from the controls of a "User Settings" GUI?

2 views (last 30 days)
I have read up on ways to share data between callback functions in a GUI. However, what I’ve read seems to apply to sharing data between callbacks from the same GUI. I’m trying to share data between callbacks from two different GUIs. The talked about techniques I’ve come across don’t work in my case.
My overall objective is to provide a "User Settings" GUI as a pop-up that can be activated from my “Main GUI.” I want the “Main GUI” callbacks to be able to access the data on the controls in the “User Settings” GUI after the "User Settings" GUI has been closed by user.
Wondering if what I’m trying to do is possible and how. Thanks in advance for any helpful guidance.

Accepted Answer

Paulo Silva
Paulo Silva on 19 Apr 2011
User Settings saves the settings like Doug shown and your Main GUI reads the saved data (the mat file).
  2 Comments
.
. on 24 Apr 2011
Thanks for the answer. Writing the data in one GUI to a file, then reading the data from the file, as shown by Doug, worked. Wondering if this is the only known way to share data between two GUI's (other than global variables). Reason I ask, is that I also need to pass a video file from one GUI to another. If I have to write the video file to disk then read it, this will be slow. Assigning the video array as a global is workable, but not such a clean way to write maintainable code.
Paulo Silva
Paulo Silva on 24 Apr 2011
There are many ways to share data between two GUI's
input and output arguments
app_data
tag objects and using findall
UserData property of objects

Sign in to comment.

More Answers (0)

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!