Borrar filtros
Borrar filtros

App Designer return from function if ui directory is closed using uiopen

1 visualización (últimos 30 días)
Paige
Paige el 1 de Dic. de 2022
Respondida: Amal Raj el 20 de Mzo. de 2023
Hi, I've got two functions that saves and loads multiple ui table data. They work fine when files are selcted but for load it throws an error when the ui directory to search for a file/folder is closed/exited. How can I determine that its been closed to return from the function ? Im using uiopen.
(for refernce I did get it to work using save with save(fullfile(Location, name), 'a','b',etc) where location = uigetdir. using if location==0 then return.)
Thanks in advance :)

Respuestas (1)

Amal Raj
Amal Raj el 20 de Mzo. de 2023
If I understand your question correctly, you want to detect if the directory selected by the user using uiopen has been closed/exited so that you can return from the function.
One approach you can take is to use a try-catch block to catch the error thrown by uiopen when the directory is closed/exited.

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by