Filter löschen
Filter löschen

Selecting an image folder in App designer

1 Ansicht (letzte 30 Tage)
Sujith Roy
Sujith Roy am 13 Nov. 2018
Bearbeitet: Cris LaPierre am 13 Nov. 2018
Hi All,,
I'm trying to onvert my gui from GUIDE to APP designer. I used the migration tool to do this.
I have a button that selects all the image from a folder when it is selected. This was working well in GUIDE but doesnt work after being converted.
Here is my code. Thanks in advance :)
GUIDE : - Works fine
function SELECT_FOLDER_Callback(hObject, eventdata, handles)
% hObject handle to SELECT_FOLDER (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
folder_path = uigetdir('../Input To GUI');
path_details.input_folder = folder_path;
[count_curvature,count_normal,count_images,im_names,im_names_ext] = InputPathDetails(folder_path);
path_details.count_images = count_images;
catch
% errordlg('Please select an image folder','Error');
return
APP DESIGNER: - Only catch statement is executing
function SELECT_FOLDER_Callback(app, event)
% hObject handle to SELECT_FOLDER (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
folder_path = uigetdir('../Input To GUI');
path_details.input_folder = folder_path;
[count_curvature,count_normal,count_images,im_names,im_names_ext] = InputPathDetails(folder_path);
path_details.count_images = count_images;
catch
% errordlg('Please select an image folder','Error');
return
end
  1 Kommentar
Cris LaPierre
Cris LaPierre am 13 Nov. 2018
Bearbeitet: Cris LaPierre am 13 Nov. 2018
I need to ask a couple clarifying questions.
Where is your structure path_details coming from?
What does InputPathDetails do? It appears to be a function called in your code but not included. It could be an error inside that function that is cauing the code to jump to the catch statement.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by