Is there a way in App designer to view recently accessed files?

2 visualizaciones (últimos 30 días)
Shreedhar Savant Todkar
Shreedhar Savant Todkar el 30 de Abr. de 2021
Comentada: Adam Danz el 4 de Mayo de 2021
I am designing a processing app using Matlab App designer for one of my application and this is what I want to add:
I always have certain files to be processed (myFile.mat) which will be processed using their specified reference files (myRef.mat):
myFile1.mat myRef1.mat
myFile1.mat myRef1.mat
myFile1.mat myRef1.mat
...
I would like to save this combination so that when I launch the application at a later time, the reference file is automatically chosen if it has been aalready used. For example, if I have run the app once before to process myFile6.mat and used myRef6.mat, next time when I choose myFile6.mat, I should automatically get the reference file ready.
Is there a way in App Designer to achieve this? I am doing this on 2021a.
  3 comentarios
Shreedhar Savant Todkar
Shreedhar Savant Todkar el 4 de Mayo de 2021
Editada: Shreedhar Savant Todkar el 4 de Mayo de 2021
@Mario Malic thanks! I thought of this but considering the advancements in App Designer, I assumed there might be a workaround of sorts.
Adam Danz
Adam Danz el 4 de Mayo de 2021
When you close the app, all of the property values are lost so that when you reopen the app the default property values are loaded again. The only want to store something in member after the app is closed to by saving the content somewhere (mat file, text file, csv file, etc) and then reloading it when app designer starts again.
It's relatively simple. Your startup fcn just need to determine whether the file exists or not and if it exists, load it.
You could save the file in the same folder as your app or you could use tempdir to save the file to the temporary directory but that dir could could be cleared between sessions depending on your system's settings.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by