However, the way I've approached this problem in the past is to write all of my processing code into a handle object. The GUI takes the handle to the object and registers listeners on any properties and events that it cares about with proper callbacks to deal with the change in data. So instead of having to write one GUI to talk to the other, you just write each GUI to update the base object and update itself when something it cares about in the base object changes.
"Alex " <email@example.com> wrote in message <firstname.lastname@example.org>... > I have a GUI that runs a pretty intense data analysis on videos. For a new type of data I need to run, I have modified my original GUI to launch a 2nd GUI that lets me preview a portion of the data. After previewing the the data, I can also input initial conditions into the 2nd GUI, and import them into my main GUI with a push button (via setappdata and getappdata). > > Part of the preview (2nd GUI) is to help me select a single, specific frame of the video to analyze, and cut out parts of the video's frames that do not contain useful data, and would only take up cpu/ram for no real need. When I identify the frame I would like to use, I enter it in an editbox, which is (successfully) passed/imported to the code of the main GUI. > > There is another editbox in the main GUI that serves the same function that is being kept for the sake of the old data analysis method (as I will be needing it also). > > My question is how do I get the frame number I entered in the 2nd GUI to appear in the corresponding editbox of the main GUI when I import the variables? > > Short version: > I want to update the contents of an editbox of one GUI with the contents entered into the editbox of a 2nd GUI. > > something like: > gaussianFrame = str2num(get(handles.GUI_2_editbox,'string')); %get frame number entered in 2nd gui > > set(handles.GUI_1_editbox, 'string', gaussianFrame); %set string in 1st gui editbox to gaussianFrame