Point to Images in App Folder

1 回表示 (過去 30 日間)
Dennis Premoli
Dennis Premoli 2022 年 5 月 10 日
コメント済み: Dennis Premoli 2022 年 5 月 10 日
Hi everyone,
I'm currently trying to solve the annoying issue of images in my app not loading as the code cannot find them.
I am working with github and everytime I open the app or redownload the folder with the icons in it, I have to manually tell within the app design screen, where to browse to find those images. Obviously I have to find a way to fix this for when people will download this folder in the future and won't have access to the editor.
So, assuming the images will be in the same folder as the app when downloaded, what;s the best way to point to them?

採用された回答

Kevin Holly
Kevin Holly 2022 年 5 月 10 日
編集済み: Kevin Holly 2022 年 5 月 10 日
I would suggest packaging your app before sharing it with others. See more information here.
Alternatively, you could add the image as the Icon programmatically and use the full file path using fullfile, but I would suggest packaging your app.
fullfile(pwd,filename)
  1 件のコメント
Dennis Premoli
Dennis Premoli 2022 年 5 月 10 日
Thanks, I agree packaging it would fix the issue. That said, as we're still developing this, it would be more of use if one had access to the app file itself for debugging and such.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by