Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

re: GUI's in MatLAB using GUIDE

  • 05-03-2003 12:10PM
    #1
    Closed Accounts Posts: 7


    hey,
    I'm trying to use the modal question dialog demo and having some problems when I try to call it from another GUI.
    I keep getting an error that tells me gui_mainfcn is not
    defined. I have looked at the sample code and can see where the error is occurring,
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
    gui_Singleton = 1;
    gui_State = struct('gui_Name', mfilename, ...
    'gui_Singleton', gui_Singleton, ...
    'gui_OpeningFcn',
    @modalGUIQuestionDialog_OpeningFcn, ...
    'gui_OutputFcn',
    @modalGUIQuestionDialog_OutputFcn, ...
    'gui_LayoutFcn', [] , ...
    'gui_Callback', []);

    if nargin & isstr(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
    end


    if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
    else
    gui_mainfcn(gui_State, varargin{:});
    end
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Does anyone know a way around this ?
    Thanks
    joe.


Comments

  • Registered Users, Registered Users 2 Posts: 932 ✭✭✭yossarin


    ok a stupid question:
    have you added the file/function gui_mainfcn() to your import list ?
    ....god i hate matlab.


Advertisement