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

2 Ansichten (letzte 30 Tage)
Shreedhar Savant Todkar
Shreedhar Savant Todkar am 30 Apr. 2021
Kommentiert: Adam Danz am 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 Kommentare
Shreedhar Savant Todkar
Shreedhar Savant Todkar am 4 Mai 2021
Bearbeitet: Shreedhar Savant Todkar am 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 am 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by