Compiling a multiwindow app as a web app

조회 수: 15 (최근 30일)
Levi Blake
Levi Blake 2022년 11월 15일
댓글: Aniket 2024년 9월 24일
Before I start, I'd like to clarify that I am aware that you can't have multiple windows in web apps. I just have questions on how the compiler will respond and my current workflow prevents me from testing it out myself for awhile. Any help is appreciated.
At the moment, my app is only used on desktop. I currently have a couple of extra interfaces for advanced use cases that only I will use and will only need to run through the full Matlab environment. That being said, the rest of the app (aka the main window) is used by multiple people in my organization.
I'm considering deploying the main app as a web app so my users can access it more easily, but I still want the ability to use multiple windows for myself on desktop. I also want to only have 1 version of the app with simple variable to lock off the tools that only I need. When trying to compile a multi-window app as a web app, will the compiler prevent me from doing so? Or will it compile the app and only throw errors when a user tries to open one of the additional windows?

답변 (1개)

Aniket
Aniket 2024년 9월 20일
Yes, you are right that Multiwindow apps are not supported by web apps. If you attempt to compile a multi-window app as a web app using MATLAB, the compiler will not prevent you from compiling the app. The compilation process itself will likely proceed without any issues. However, when you deploy and run the app on the MATLAB Web App Server, you will encounter errors related to the unsupported multi-window functionality.
Specifically, you might see errors such as:
- "Web Apps does not support multiwindow apps"
- "Error using errordlg (line 2) Web Apps does not support errordlg."
Also, there exists a workaround to replicate the multi-window behavior within the constraints of a web app. Here's how you can do it:
1. Add a Tab Group: Incorporate a tab group that spans the entire application interface.
2. Integrate Windows as Tabs: Convert each of your additional windows into separate tabs within this group.
3. Switch Tabs Instead of Opening Windows: Instead of opening a new window, switch to the relevant tab to display the desired content.
You may refer to the following MATLAB answer by MathWorks Support Team for further details:
I hope this answers your query!
  댓글 수: 2
Levi Blake
Levi Blake 2024년 9월 23일
Will these errors appear when the app is first being deployed, or will they only show up as the app is running and the multiwindow functionality is triggered?
Aniket
Aniket 2024년 9월 24일
When a multiwindow app is compiled, it packages with the following warning log:
After deploying, the webapp works fine. Error is only displayed when any multiwindow functionality is triggered.

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

카테고리

Help CenterFile Exchange에서 MATLAB Web App Server에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by