필터 지우기
필터 지우기

Compiling existing code into web apps

조회 수: 1 (최근 30일)
Julian Schmid
Julian Schmid 2020년 8월 20일
댓글: Julian Schmid 2020년 8월 25일
Hi all,
I recently played around with the web app server and run into a problem. I have a GUI from a previous project which uses the uifigure() and its components programatically to create a GUI (basically the same components availible trough the app designer). The app works well with Release 2020a, however compiling the code into a web app seems to be impossible. Do I really have to rebuilt the GUI in App designer (.mlap file) in order to be able to compile it into a web app, or did I miss something important?
Thank you for your time!

채택된 답변

Mohammad Sami
Mohammad Sami 2020년 8월 21일
The easiest way would be to create a blank app and then add a startupFcn.
In the startupFcn you can pass in the app.UIFigure to your exisiting code.
You may need to slightly modify your exisiting code.
% Code that executes after component creation
function startupFcn(app, varargin)
yourexistingfunction(app.UIFigure);
end
You can add the startupFcn by clicking the App Input Arguments. You can use varargin as you cant leave it blank.
  댓글 수: 1
Julian Schmid
Julian Schmid 2020년 8월 25일
That should work for now, thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by