Azzera filtri
Azzera filtri

Is there a workaround to use GUIs created with GUIDE inside a namespace?

2 visualizzazioni (ultimi 30 giorni)
I run into the problem GUIs created with GUIDE cannot be placed inside a namespace.
For example, i have a namespace folder +ns which contains gui.fig and the corresponding gui.m.
Now, when I run
>> +ns.gui
It fails because this command starts +ns.gui.m which then searches for gui.fig which it can't find because it's hidden in the namespace...
Has anyone figured out a way around this? Is there an edit we can make to the boilerplate code that GUIDE creates so that it looks in the same namespace that the gui.m is in?
Thanks in advance.
I pasted the full error below, mostly to facilitate finding this problem.
>> +ns.gui
Error using load
Unable to read file 'gui.fig'. No such file or directory.
Error in (line 31)
hgDataVars = load(filename, '-mat', '-regexp', '^hg[M]');
Error in
Error in hgload (line 54)
FF =;
Error in matlab.hg.internal.openfigLegacy (line 57)
[fig, savedvisible] = hgload(filename, struct('Visible','off'));
Error in gui_mainfcn>local_openfig (line 286)
gui_hFigure = matlab.hg.internal.openfigLegacy(name, singleton, visible);
Error in gui_mainfcn (line 158)
gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible);
Error in ns.gui (line 40)
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Risposte (0)


Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by