I gave up on fixing these files, and rebuilt from scratch. I figured out that one cause was sort-of my own fault. I still hate that Matlab got rid of the zoom, etc. options on the top bar of figures. So I use the hack which turns it back on...but the app designer keeps treating things like figures, and this hack leads to errors. I still don't know where those errors are, or how to fix them...but that was the root cause.
App Designer "internal error" after trying to move the file
22 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm working on Windows 10, Matlab R2020b, building my first GUI in App Designer, since I prefer functional programming.
I had mostly finished building the GUI, and needed to move it to a different folder. I just used Windows to copy the .mlapp & two associated functions to a new folder, and rename the originals. Upon trying to open I get an error:
"One or more components have experienced an internal error.
Opening this app will remove these components and cause loss of functionality or errors"
It gives the option to View Code Differences, and I see 34 properties and their related code removed.
Renamed copies in the original folder -- same error
I returned the files where they came from -- same error
I asked Google -- got no hits
- How do I get this app back to where it was before I copied it?
- How do I safely move .mlapp files?
Thank you,
mlb
Risposte (1)
Divyam
il 7 Nov 2024 alle 5:12
Modificato: Divyam
il 7 Nov 2024 alle 5:13
Before trying out any troubleshooting methods, always create backups of your original files. It is not possible to restore the app to its original version since you dont mention using any source control software or having any backups. You have to recreate the deleted components as there is no other way to restore them.
As a troubleshooting step, check if the folder you are copying the app to is on MATLAB path and contains all the dependencies required by your app. If the destination folder is not on MATLAB path, you can use the "addpath" function to add the folder to your MATLAB path.
addpath('insert full path to destination');
Always avoid moving MATLAB files using Windows file explorer. Use the "movefile" and the "copyfile" functions provided with MATLAB to move and copy your files to different destinations.
movefile('source\myApp.mlapp', 'destination\myApp.mlapp');
Another possible area of error can be that renaming crucial files associated with callbacks/data might have caused your components to be deleted due to references not being found.
For more information about the "addpath", "movefile" and "copyfile" functions, refer to these documentation links:
- https://www.mathworks.com/help/matlab/ref/addpath.html
- https://www.mathworks.com/help/matlab/ref/movefile.html
- https://www.mathworks.com/help/matlab/ref/copyfile.html
A similar error was reported here, you can check out this MATLAB answer for more information regarding your query: https://www.mathworks.com/matlabcentral/answers/1822133-matlab-doesn-t-open-a-mlapp-file-created-in-a-different-computer
0 Commenti
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!