GUI compatibility before and after version 2014b

4 次查看(过去 30 天)
Hi All,
I have written a toolbox with colleagues. We have created GUIs using Matlabd 2009a and they used to work on Matlab versions 2007b to 2014a. With the new Matlab graphics in 2014b, we had to update the code and the GUIs (to put all panels and children in front). Users now report having this error 'invalid Figure file format' when loading the modified GUIs in older versions of Matlab (e.g. 2008a). As our software is open-access and we don't want to force people to upgrade, we would like to know what would be the solution for GUI backwards compatibility.
Thank you for your suggestions.

采纳的回答

Walter Roberson
Walter Roberson 2015-5-13
Figure files are files in MATLAB .mat format. There was a change in the .mat format a few years ago in order to store the "new" style classes. The change was not backwards compatible, so new .fig cannot be opened in releases that predated the change.
I do not have R2014b or later, so I do not have an opportunity to experiment with new .fig files. I would think it likely that new .fig files are being saved using the new HG2 graphic objects. It would not surprise me at all if some of the older releases do not have the full set of HG2 class definitions (HG2 has been under development for some time so some of the older releases should support some of the objects.) But retrieving a newer object not defined in an older release would produce a different error message than what you are seeing, not a "file format" difficulty.
It has never been the case that .fig files were promised to be backwards compatible.
I do not know if there is any solution other than creating one release for "as far back as you care to do", and another for R2014b onwards.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by