calling a gui to return argout correctly

2 views (last 30 days)
Art
Art on 22 Sep 2015
I have a function that needs to open a gui, allow the user to select from a dropdown set of files and then hit the "OK" or "CANCEL" button.
Using R2015b GUIDE, I created a simple GUI with dropdown list and OK and CANCEL button. The code I put within the GUIDE generated function for the "OK" callback is this:
input_file_text = get(handles.CSV_File_List,'String');
input_file_value = get(handles.CSV_File_List,'Value');
input_file = input_file_text(input_file_value);
handles.output = input_file;
varargout{1} = handles.output;
uiresume
And in the OutputFCN I included the "delete(handles.Figure1)". When I call the gui like this:
[outputfile] = CSV_Name
The output I get is a statement that says: "outputfile = handle to deleted Figure". How do I get it to output the desired string?

Answers (0)

Categories

Find more on App Building 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!