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

6 ビュー (過去 30 日間)
Shreedhar Savant Todkar
Shreedhar Savant Todkar 2021 年 4 月 30 日
コメント済み: Adam Danz 2021 年 5 月 4 日
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 件のコメント
Shreedhar Savant Todkar
Shreedhar Savant Todkar 2021 年 5 月 4 日
編集済み: Shreedhar Savant Todkar 2021 年 5 月 4 日
@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 2021 年 5 月 4 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by