classdef EDFMGuideApp < dynamicprops %EDFMGUIDEAPP App-like container used by the GUIDE implementation. properties Controller EDFMAppController end methods function obj = EDFMGuideApp(handles) names = fieldnames(handles); for i = 1:numel(names) name = names{i}; if isprop(obj, name) obj.(name) = obj.wrapHandle(name, handles.(name)); else addprop(obj, name); obj.(name) = obj.wrapHandle(name, handles.(name)); end end end end methods (Access = private) function value = wrapHandle(~, name, handleObj) if strcmp(name, 'UIFigure') || isa(handleObj, 'matlab.ui.container.TabGroup') || ... isa(handleObj, 'matlab.ui.container.Tab') || isa(handleObj, 'matlab.graphics.axis.Axes') value = handleObj; else value = EDFMGuideComponent(handleObj); end end end end