Code disappeared from App Designer

조회 수: 17 (최근 30일)
Denis Stanescu
Denis Stanescu 2024년 7월 1일
이동: Walter Roberson 2025년 2월 23일
I have been working in the last months on a software interface in AppDesigner. I'm down to about 11,000 lines of code. Today, when I wanted to update, I opened the application and saw that the code was missing. All callbacks are gone, including StartupFcn. There are only a few lines of code specific to the axes and buttons in the interface.
If I open and run the code it does not work. If I run the mlapp file, it opens and does its job. But I don't know where the code disappeared. Something like this happened to you ever???
Thanks!
  댓글 수: 3
Denis Stanescu
Denis Stanescu 2024년 7월 3일
No problem with matlab. No git. I'm using the 2020 version, but I tried to open it in 2022 and 2023 as well. I think maybe it's because there are many lines of code.
If I open the mlapp file, the elements in the design view are there, but in the code view part, the code is missing. If I run, nothing happens. But if I don't open the file and run directly, the application runs and does what it needs to do. I think that the code is still there, only that it is no longer visible. I restarted several times and nothing.
yuxuan
yuxuan 2025년 2월 23일
이동: Walter Roberson 2025년 2월 23일
Same thing happened to me, I just changed some things in the GUI, and all my code and variables were gone. I did not even turn off matlab, it ran just a few minutes ago, I only added a few buttons and moved some elements around

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

답변 (1개)

Umar
Umar 2024년 7월 1일
Hi Denis,
I am sorry to find out that you are having these issues. I have some suggestions to help you out to recover the missing code, you can try the following steps: First, Check the version history or backups of your project to see if you can retrieve an earlier version that contains the missing code.
Then, inspect the .mlapp file in a text editor to see if the code is still present but not visible in the AppDesigner interface.Recreate the missing callbacks and StartupFcn functions based on your mlapp file's current behavior.
Hopefully, by following these steps, you should be able to recover and restore the missing code in your AppDesigner interface.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by