Why App Designer wants to always save changes even if nothing is changed?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Ameer Hamza
2020-11-3
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.
采纳的回答
Petri M
2020-11-11
2 个评论
Mario Malic
2020-11-11
Nice find!
However, TMW won't notice the bug if it's not submitted to bug reports or if staff sees this question.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!