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

7 vues (au cours des 30 derniers jours)
Shreedhar Savant Todkar
Shreedhar Savant Todkar le 30 Avr 2021
Commenté : Adam Danz le 4 Mai 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 commentaires
Shreedhar Savant Todkar
Shreedhar Savant Todkar le 4 Mai 2021
Modifié(e) : Shreedhar Savant Todkar le 4 Mai 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 le 4 Mai 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by