Code disappeared from App Designer
Afficher commentaires plus anciens
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 commentaires
Dinesh
le 3 Juil 2024
Which MATLAB release are you using? I've never heard of this issue before.
If you are using a version control system like Git to store your code, then you might need to check if you changed to a local branch that doesn't have the latest changes. As of now, I can't think of any other reason why this might happen.
Did you do anything unusual in MATLAB recently? Did you try restarting MATLAB and seeing if you are still facing this issue? Did you check if this file is an empty copy of the actual app that you might have created sometime back?
Denis Stanescu
le 3 Juil 2024
yuxuan
le 23 Fév 2025
Déplacé(e) : Walter Roberson
le 23 Fév 2025
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
Réponses (1)
Umar
le 1 Juil 2024
0 votes
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.
Catégories
En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!