Selecting an image folder in App designer

1 visualización (últimos 30 días)
Sujith Roy
Sujith Roy el 13 de Nov. de 2018
Editada: Cris LaPierre el 13 de Nov. de 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 comentario
Cris LaPierre
Cris LaPierre el 13 de Nov. de 2018
Editada: Cris LaPierre el 13 de Nov. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by