Is it possible to convert between ComponentContainer and AppBase classdef files?

조회 수: 3 (최근 30일)
Amos
Amos 2023년 3월 9일
댓글: Amos 2023년 3월 10일
Appdesigner does not admit editing of the classdef line.
¿Is there a built-in or otherwise recommended method for converting between ComponentContainer- and AppBase-derived classes?
E.g., ¿could this be done by exporting to .m file, editing, and then somehow importing as .mlapp?
One workaround for the componentapp direction, is to wrap the component in a trivial application.

답변 (1개)

Harsh Sanghai
Harsh Sanghai 2023년 3월 9일
Hi,
You can export the App Designer project as a MATLAB file (.m) and edit the classdef line in the exported file. Once you've made the necessary changes, you can import the updated MATLAB file back into App Designer using the "Import" button on the "Apps" tab.
Alternatively, you can create a new App Designer project based on the ComponentContainer or AppBase class, and then copy and paste the relevant code from the old project into the new one.
  댓글 수: 1
Amos
Amos 2023년 3월 10일
Thanks for the quick reply, Harsh.
I'm stumped by this bit:
"... you can import the updated MATLAB file back into App Designer using the "Import" button on the "Apps" tab".
I can't seem to find an "Apps" tab in in AppDesigner, nor an import button under the Apps tab in the primary MATLAB editor, or elsewhere for that matter.
Every chance this is some form of selective blindness.
I'm using 2022b, but I do note a search prior to posting the above question, yielded the following adivce from 2020:
And this from 2021:
Cheers

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

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by