GUI: problem with more GUIs opened

Hi, I created a GUI that accepts in input some data of a bigger dataset, it shows them in a table and then it does some computations. I have problems when I open more GUIs at the same time. When I do some operations on the first windows that I opened, the changes to be shown, are applied only in the last GUI opened. Do you know which is the problem? Thank you very much Marco

5 Comments

Marco - what is the relationship between the GUIs? How have you created your GUIs with GUIDE, programmatically, or with App Designer? Please provide more details.
You aren't using global variables of the same name in each of them, are you? Because global variables live in the global workspace and if you change it from one GUI, it will change it for all GUIs that use that global variable.
When you "do some operations on the first windows", are these operations being done by code in the first window on variables in the first window, or are you trying to do these operations from second/third GUIs on variables in the first window (variables existing in the scope of the first GUI only)?
And where are the "changes to be shown"? Are the changes supposed to be visualized in all the GUIs, just the first GUI, or just the GUI that caused the changes, or somewhere else (like a new figure window or something)?
Hi,
sorry for the little detailed question. So, I created the GUI programmatically.
To be more precise, I explain what my GUI does. When I launch the main function, a GUI is created and shown, and it receives a struct as input. This struct consists of a first level of elements, and each elements have a second level of sub-elements. The first level of the struct is shown in a pop-up menu. In base of the choice of the user, a table is filled with the sub-elements of the selected item.
I need to launch different GUIs, in order to elaborate different data, but each GUI is independent of each other. Each GUI is stand-alone. I don't use global variables.
But when I try to use the first GUIs that I have launched, the value of the selected item is use to fill the table in the last GUI opened, with the elements of the struct of this last window.
I hope to have made my meaning more clear.
Thank you,
Marco
Adam Danz
Adam Danz on 13 Dec 2019
Edited: Adam Danz on 13 Dec 2019
"when I try to use the first GUIs that I have launched, the value of the selected item is use to fill the table in the last GUI opened"
Is that what it's supposed to do or is that the error you're describing in, "When I do some operations on the first windows that I opened, the changes to be shown, are applied only in the last GUI opened." ?
If that's the problem, where should the data go instead and what does your code look like that is assigning the data to the (wrong) GUI?
Marco Read this link then add your screenshots. We will understand better after we see something, don't you agree?

Sign in to comment.

Answers (0)

Categories

Tags

Asked:

on 13 Dec 2019

Edited:

on 13 Dec 2019

Community Treasure Hunt

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

Start Hunting!