web() and inputdlg() in App Designer

조회 수: 13 (최근 30일)
Robin Schäfer
Robin Schäfer 2021년 2월 25일
댓글: Robin Schäfer 2021년 2월 28일
I tried to call the functions web() and inputdlg() from an App Designer app. The functions are stored in another function which is called in the app.
In App Designer
WebAndDlg
the function (as a separate .m file):
function WebAndDlg
% ... some other code that functions well
web(url)
inputdlg(str1, str2)
% ...
end
There is no dialogue box nor the browser opens while the rest of the code works :( Any ideas?
  댓글 수: 9
Simon Allosserie
Simon Allosserie 2021년 2월 26일
R2019b
Robin Schäfer
Robin Schäfer 2021년 2월 28일
I have compiled the app and both functions (web and inpudlg) work fine! So, it's actually possible, but I don't know in your case if it has something to do with the versions (e.g. Matlab Runtime) ...

댓글을 달려면 로그인하십시오.

답변 (1개)

J. Alex Lee
J. Alex Lee 2021년 2월 26일
i think you can get around both limitations with some extra coding...never tried it, and just a thought, but...
you could probably "fake" a modal input dialog with a uipanel containing an uieditfield, that you can position manually within the app figure. The trick is to either disable all interactions in the base figure (if that's important to you) when the uipanel is made visible, or make the uipanel cover the entire app.
for an alternative to web(), maybe as simple as uihtml()...you can set the htmlsource, but i have no idea if that source can be arbitrary locations on the internet.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by