GUIDE Migration to App Designer: hObject, eventdata, handles <-> app, event
Show older comments
Hi,
I have several GUIDE apps that were developped on Matlab 2014/2018, and still run great even in 2024.
I have now upgraded to 2025/2026, and need to migrate to App Designer. I have used the GUIDE Migration strategies & provided plugin, and successfully converted the GUIDE .fig -> .m mlApp.
However, I am struggling to maintain backward compatibility with older Matlab version on the newly created .m files. I noticed that a lot of the code is now calling conversion functions such as
[hObject, eventdata, handles] = convertToGUIDECallbackArguments(app, event)
These do not exist on 2018b, is there a way to maintain 2018b compatibility on the newly migrated App Designer apps?
Undefined function 'convertToGUIDECallbackArguments' for input arguments of type 'xyz'.
Error in xyz/xyz_OpeningFcn (line 425)
[hObject, eventdata, handles] = convertToGUIDECallbackArguments(app); %#ok<ASGLU>
Error in xyz (line 1043)
runStartupFcn(app, @(app)xyz_OpeningFcn(app, varargin{:}))
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)xyz('figure1_ResizeFcn',hObject,eventdata,guidata(hObject))
Undefined function 'getRunningApp' for input arguments of type 'xyz'.
Error in xyz (line 461)
runningApp = getRunningApp(app);
Undefined variable "appdesigner" or class "appdesigner.appmigration.UIControlPropertiesConverter".
Error in convertToGUIDECallbackArguments>localCreateHandles (line 115)
component = appdesigner.appmigration.UIControlPropertiesConverter(component);
Error in convertToGUIDECallbackArguments (line 43)
handles = localCreateHandles(appFigure);
Error in xyz/STLSummaryWindow_OpeningFcn (line 425)
[hObject, eventdata, handles] = convertToGUIDECallbackArguments(app); %#ok<ASGLU>
2 Comments
Walter Roberson
on 29 Jan 2026
The documentation at https://www.mathworks.com/help/matlab/creating_guis/differences-between-app-designer-and-guide.html implies that the function still exists... and on my R2025b system I find it at /Applications/MATLAB_R2025b.app/toolbox/matlab/appdesigner/appdesigner/runtime/convertToGUIDECallbackArguments.m
Rik
on 29 Jan 2026
If you need to maintain compatibility everywhere, you may also want to consider a complete rebuild of the graphical elements into a single pure m-file. That way you don't need to deal with .fig and .mlapp files that limit compatibility.
You could even choose to branch your code to use a figure on older releases and uifigure on newer releases.
Answers (0)
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!