Why App Designer wants to always save changes even if nothing is changed?
19 views (last 30 days)
Show older comments
This is not a serious problem but it is quite annoying:
Every time when I open mlapp file in App Designer it immediately shows the file has changed and wants to save it after closing, although I have not even clicked anything on the editor. And, especially if I have had a longer session with several files open, I cannot remember which ones I have actually changed and then have to save all to be sure.
This causes extra trouble when using version control, because the saved mlapp is always different, even if there is no changes. So, I end up updating mlapp files to version control all the time even there is no need to. I know that if I would convert mlapp to m-file then version control could detect if there is actually any change, but after conversion to m-file it cannot be edited in App Designer anymore, so it is not a practical option.
Does anybody know why this is happening and is there any fix for it?
I wonder if Mathworks staff is aware of this and going to do anything for it.
9 Comments
Ameer Hamza
on 3 Nov 2020
Ok, I didn't notice it earlier. I tried the two apps you shared. The first time I open it, I get the same behavior (i.e., an asterisk appears to save the file). However, once I save the file and close it, then on the subsequent opening of the files, it does not show an asterisk. I got the same behavior on both windows 10 and macOS.
Also, the first time the asterisk appears is not without reason. It appears after showing the message "app name updated to match the file name". This message appears if you initially created your app with one name and then rename the mlapp file. For example, initially, I named my app as myApp.mlapp; the first line in code view is
classdef myApp < matlab.apps.AppBase
but If I rename the file to myApp2.mlapp and then open the file, the MATLAB will automatically change the first line to
classdef myApp2 < matlab.apps.AppBase
and consequently the asterik appears.
Accepted Answer
Petri M
on 11 Nov 2020
2 Comments
Mario Malic
on 11 Nov 2020
Nice find!
However, TMW won't notice the bug if it's not submitted to bug reports or if staff sees this question.
More Answers (0)
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!