필터 지우기
필터 지우기

Running compiled AppDesigner app. Error finding getRunningApp

조회 수: 7 (최근 30일)
CAM
CAM 2024년 2월 23일
편집: Voss 2024년 2월 26일
I am running a compiled GUIDE program. (This is a very large, complex legacy program). We wanted to add a custom pop-up window, which we created in App Designer. The program suite runs perfectly fine within the Matlab environment. But when I compile and run it, I get an error that says it can't find getRunningApp (which is part of the App Designer boiler plate code). I can't find that function anywhere in the Matlab folders to include it in the prj file.
I tried including the app's mlapp file in the prj file and the app's m-file in the prj file. Both compiled files give the same error.
Am I missing something?

채택된 답변

Voss
Voss 2024년 2월 26일
Here's some wild speculation: getRunningApp is only used when the .mlapp is a singleton app (i.e., an app that allows only one instance of itself to run). If that's true, then you can make your .mlapp not a singleton app and see if it compiles and runs, since nothing will attempt to call getRunningApp in that case(?).
To do so: in App Designer, click the Designer tab up top, click "App Details", then click "Code Options" at the bottom of that window, and uncheck "Single Running Instance". Click OK to close the window. Save the .mlapp file. Compile and run. See what happens.
  댓글 수: 2
CAM
CAM 2024년 2월 26일
Thank you! Your suggestion to uncheck the "Single Running Instance" solved my issue.
I forgot to mention that while I develop in 2023a, I have to compile in 2019b, so the users don't have to keep downloading the matching Runtime with every update. (Call out to Mathworks to please allow Runtime to be version agnostic!) That being said, I had to tweak my app to remove a few settings from 2023a that were not in 2019b (ex: Word Wrap). Now it runs properly.
Thank you again for your insight and help.
Voss
Voss 2024년 2월 26일
편집: Voss 2024년 2월 26일
You're welcome! I'm glad that worked for you.
I should point out that, because the App Designer app is no longer a singleton app, you may need to adjust your GUIDE m-file code to prevent multiple instances of the app from running at once, if that's a concern.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by