From: Gerbil Gerbil on
Hi Everyone,

I'm trying to design a GUI that I can run from a script, returning the
values entered by the user back to the script for further processing.

My problem is that I can't seem to get my values back through their
varargout. I've tried tinkering with the output function, but it
hasn't fixed anything. I've tried putting something in here to test
the output, and it successfully updates handles.output to 'test
output', so I know the problem isn't that it's not returning it:

> function varargout = myFunction_OutputFcn(hObject, eventdata, handles)
> handles.output = 'test output'; % to test the output
> varargout{1} = handles.output;

It works, but if I try to update handles.output by updating the
handles variable using my other callbacks, it doesn't seem to be
getting back to the main function:
> function varargout = myGUI(varargin)

It seems to me that the main function (myGUI) expects a return from
myFunction_OutputFcn before any of my other callbacks can do their
updating of the variables by the user, so it's tripping over trying to
provide a handles.output that isn't being provided by the handles
input.

I know that the rest of handles being passed between the callbacks are
working, since I am able to display the updated variables in a msgbox
triggered by a user pressing a push button. I'm just not entirely sure
how it is that all my other functions can pass handles to each other
perfectly well, while this output function isn't getting updated in
the same way.

I'd really appreciate any advice on this,

Laura