Error with uigetdir and uigetfile in a Standalone Application (applicationCompiler)

4 ビュー (過去 30 日間)
I made a standalone application from a main script, but at a certain point I get this error:
Unable to resolve the name
'matlab.ui.internal.dialog.FileDialog Helper.is Deployed Env'
I know that there are problems with uigetdir and uigetfile, as a matter of fact I used uigetdir_workaround function as suggested from another user and now I can select the directory, but I don't find a solution for uigetfile.
thispath=uigetdir_workaround(pwd,'Select the directory containing .tdf files of the desired subject');
%% Ask user to select tests files
for t=1:n_test
[name,path] = uigetfile('*.tdf',"Select file of " + testslist{t} + " FRP test", thispath);
  3 件のコメント
Marco Dal Corso
Marco Dal Corso 2023 年 1 月 26 日
編集済み: Marco Dal Corso 2023 年 1 月 26 日
Thank you for your help. I'm using R2022 version and the correspondent runtime version is installed.
I didn't find anything too, and that's why I'm asking here
dpb
dpb 2023 年 1 月 26 日
This is not official TMW support and may not be seen by anybody from TMW. Think you would need to contact TMW support directly.

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

採用された回答

Manoj Mirge
Manoj Mirge 2023 年 3 月 23 日
Hi Marco,
Please try the following workarounds to help resolve the issue:
Workaround 1:
Add the flag "-a C:\Programs\MATLAB\R2022b\toolbox\matlab\uitools\uicomponents\components\+matlab\+ui\+internal" to mcc command while building standalone app.
Workaround 2:
Add "%#function matlab.ui.internal.dialog.FileDialogHelper" line in your main script before building standalone app.
I hope the above workaround resolves your query.
  2 件のコメント
KAE
KAE 2024 年 3 月 8 日
編集済み: KAE 2024 年 3 月 8 日
By main script, you mean the mfile you are trying to compile, right? and this mfile should contain the line,
%#function matlab.ui.internal.dialog.FileDialogHelper
Andrew Stevens
Andrew Stevens 2024 年 8 月 21 日
I too have this problem and am confused by your answer, especially workaround 2. How does putting a comment in the mfile help to resolve this issue. Please elaborate. Thanks.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by