Compiling a multiwindow app as a web app
14 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
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 件のコメント
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 Center および File Exchange で MATLAB Web App Server についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!