Matlab Guide-created GUI local function calls

5 views (last 30 days)
I have a rather complex GUI that was created with GUIDE and sort of grew to monstrous proportions. I am now calling my local functions within the GUI from other scripts and from the command line. I have noticed that when calling a local function, the gui_mainfcn.m chokes if the first passed argument is a character array.
For example:
I would like to call the function myFunction which is housed in myGUI.m
I can call the function successfully by using
outputs = myGUI('myFunction', argument1, argument2, argument3...);
as long as argument1 is not a character array.
The error traces to line 78 in gui_mainfcn.m where ishghandle is called on the second argument which ends up blowing up specifically if it is a character array.
Is there a way around this issue, or should I just avoid character arrays as the first argument in any of my local gui functions? Maybe it could be fixed in future versions of MATLAB?

Answers (0)

Categories

Find more on Migrate GUIDE Apps 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!