Returning Data from a GUIDE GUI
Show older comments
Holy COW !!! I've created a simple GUIDE GUI that allows me to select specific files or choose a top level path so the code can search for files - all that match certain regular expression file names. All is good... to the point where I can create a cell array of fully qualified file names for downstream work. Unfortunately, I CANNOT seem to figure out how to return this cell array to the calling program or interactive workspace. I've tried adding the cell array to varargout as something like varargout{2} = handles.user.fileList and I've tried using handles.output, where handles.output = handles.user.fileList followed by the appropriate guidata call to update. These are done in my event handler for the "Accept" button.
I've walked through the code and the OpeningFcn is called early on AS IS the OutputFcn, which seems a little crazy to me. It almost seems like this GUIDE GUI is setting up its output just after the GUI is realized and NOT allowing it to update later. I've also tried updating varargout and/or handles.output in the DeleteFcn which I thought was the last thing called upon termination (like I kill the GUI at the end of the AcceptButton code.
But none of this seems to work. Anyway, I'm a solid programmer (IDL, Python, & Java) but relatively new to MATLAB. I know this question must seem kinda dumb, but I've been wrestling this for some time now... !!!???
Thanx
Answers (1)
Fangjun Jiang
on 26 Aug 2011
0 votes
Watch this video. Seems to be exactly what you want.
Categories
Find more on Server Management in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!