필터 지우기
필터 지우기

how can I see what has been entered in the GUI1 and / or when I get back from the selected GUI2

조회 수: 2 (최근 30일)
Hello, I have the following problem: I created two GUI (GUI1 and GUI2). In the first (GUI1) I have two edit text in which I insert numerical values and two pop-up menus, and a callback function "forward" that brings me to the next GUI (GUI2) that contains two radio buttons, two list-box and two functions callback: a GUI allows you to go to the next (GUI3) the other to return to the previous GUI (GUI1). But when I select the pushbutton 'Back' to return to the gui1, the values in the edit text are not saved as well as the selections made in the pop-up menu. I wanted to know, kindly, how can I see what has been entered in the GUI1 and / or when I get back from the selected GUI2.
I saved the strings in the workspace. How do I set the value stored in the workspace in the function _OpeningFcn? I do not want that when the gui1 is started for the first time creates an error because it does not know the value saved in the workspace. If you start for the first time gui1 creates error?
Thank you for your cooperation.

답변 (1개)

Henric Rydén
Henric Rydén 2014년 5월 19일
Hi,
If I understand this correctly, in some callback in GUI1, you are calling GUI2 and closing GUI1? You want to pass on parameters from GUI1 to GUI2.
You can transfer the parameters when you call GUI2 (that is, GUI2(x,y,z) ) This will be picked up in the opening function of GUI2 and you can store the values there however you want, i usually put them in the handles structure. Set a debug point in the OpeningFcn of GUI2. To solve the problem when you go back, use nargin or something similar to check if you're going back or starting the first time.
  댓글 수: 9
Giuseppe
Giuseppe 2014년 5월 21일
But the variables I have not saved and retrieved with setappdata or getappdata passing from GUI1 to GUI2 but through the commands save info_GUI1 T (in GUI1) and load info_GUI1 (in GUI2).
Although when I run exist ('T') in the command line, when I'm going back from GUI2 to GUI1: ans = 1 which means that the numerical variable T exists in the workspace.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by