From: John on 12 Jul 2010 09:08 "Paul " <paul_tutzu(a)yahoo.com> wrote in message <i1f2ko$n7g$1(a)fred.mathworks.com>... > "John " <jfishbac(a)gmail.com> wrote in message <i1f1ol$qj5$1(a)fred.mathworks.com>... > > "Paul " <paul_tutzu(a)yahoo.com> wrote in message <i1evhv$4m2$1(a)fred.mathworks.com>... > > > "John " <jfishbac(a)gmail.com> wrote in message <i1euhh$sgj$1(a)fred.mathworks.com>... > > > > % Hi! > > > > > > > > % I open up my GUI and get the following error: > > > > > > > > ??? Error using ==> feval > > > > Undefined function or method 'figure1_CreateFcn' for input arguments of type 'double'. > > > > > > > > Error in ==> gui_mainfcn at 96 > > > > feval(varargin{:}); > > > > > > > > Error in ==> DataGrabber_GUI at 42 > > > > gui_mainfcn(gui_State, varargin{:}); > > > > > > > > Error in ==> guidemfile>@(hObject,eventdata)DataGrabber_GUI('figure1_CreateFcn',hObject,eventdata,guidata(hObject)) > > > > > > > > > > > > ??? Error using ==> struct2handle > > > > Error while evaluating figure CreateFcn > > > > > > > > % Any idea why this is happening and how to fix it? > > > > > > > > Thanks, > > > > > > > > JF > > > > > > This happens when the matlab cannot find the control (button, axes, radio button, label and so on) in the .fig file which has a function assigned in the .m file. > > > > > > If it is a figure, it is very probably that you change the name of the entire figure (main GUI window). Check the names and try to rename them in the right way. > > > > I looked through my file for any phantom controls (both visually and by using the Object Browser) and have not found anything I'm not expecting. The only things that don't have code are the uipanels. I did, however, delete some controls from my GUI recently and I'm pretty sure I was careful to delete the callbacks for all of these controls (it was after I deleted these controls that I started to see this error). Did I not dig far enough when deleting the callbacks? > > > > Thanks, > > > > JF > > I think I got it. > > The figure1 is the default tag for the GUI. You created the GUI window, created a CreateFcn function for the GUI when the tag of the window was figure1. After that you changed the name of the tag. > > So, go in the main GUI window, right-click, click on Property Inspector, search in the list for Tag and I can bet that the name is not 'figure1' anymore. You have more choices: change the name of the function to fit for the new Tag or delete the function if it contains no code (it will be automatically generated with the right name if you will ever need it in the future). > > Let me know if this was useful. > > Paul > > So click on the Paul, Thanks, I got rid of the error by RE-generating the createfcn for figure1. What I think ACTUALLY was going on was that at one time I generated a createfcn and then deleted it from the M-File. By putting the createfcn back in my GUI.m, I no longer get the error. BUT now i have a create function that I don't *think* needs to be there. I have a bunch of panels without create functions and I'm not getting errors for those controls. Any ideas on THIS? Can / how can I delete this create function without generating the error? Thanks, Thanks!
From: Steven Lord on 12 Jul 2010 09:29 "John " <jfishbac(a)gmail.com> wrote in message news:i1f43k$r05$1(a)fred.mathworks.com... > "Paul " <paul_tutzu(a)yahoo.com> wrote in message > <i1f2ko$n7g$1(a)fred.mathworks.com>... >> "John " <jfishbac(a)gmail.com> wrote in message >> <i1f1ol$qj5$1(a)fred.mathworks.com>... >> > "Paul " <paul_tutzu(a)yahoo.com> wrote in message >> > <i1evhv$4m2$1(a)fred.mathworks.com>... >> > > "John " <jfishbac(a)gmail.com> wrote in message >> > > <i1euhh$sgj$1(a)fred.mathworks.com>... *snip* > Paul, > > Thanks, I got rid of the error by RE-generating the createfcn for figure1. > What I think ACTUALLY was going on was that at one time I generated a > createfcn and then deleted it from the M-File. By putting the createfcn > back in my GUI.m, I no longer get the error. > BUT now i have a create function that I don't *think* needs to be there. I > have a bunch of panels without create functions and I'm not getting errors > for those controls. Any ideas on THIS? Can / how can I delete this create > function without generating the error? Since I'm assuming you're using GUIDE to create your GUI, change the figure's CreateFcn property (using the Property Inspector) so it no longer refers to the function, THEN delete the function. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: us on 12 Jul 2010 09:43
"John " <jfishbac(a)gmail.com> wrote in message <i1f43k$r05$1(a)fred.mathworks.com>... > "Paul " <paul_tutzu(a)yahoo.com> wrote in message <i1f2ko$n7g$1(a)fred.mathworks.com>... > > "John " <jfishbac(a)gmail.com> wrote in message <i1f1ol$qj5$1(a)fred.mathworks.com>... > > > "Paul " <paul_tutzu(a)yahoo.com> wrote in message <i1evhv$4m2$1(a)fred.mathworks.com>... > > > > "John " <jfishbac(a)gmail.com> wrote in message <i1euhh$sgj$1(a)fred.mathworks.com>... > > > > > % Hi! > > > > > > > > > > % I open up my GUI and get the following error: > > > > > > > > > > ??? Error using ==> feval > > > > > Undefined function or method 'figure1_CreateFcn' for input arguments of type 'double'. > > > > > > > > > > Error in ==> gui_mainfcn at 96 > > > > > feval(varargin{:}); > > > > > > > > > > Error in ==> DataGrabber_GUI at 42 > > > > > gui_mainfcn(gui_State, varargin{:}); > > > > > > > > > > Error in ==> guidemfile>@(hObject,eventdata)DataGrabber_GUI('figure1_CreateFcn',hObject,eventdata,guidata(hObject)) > > > > > > > > > > > > > > > ??? Error using ==> struct2handle > > > > > Error while evaluating figure CreateFcn > > > > > > > > > > % Any idea why this is happening and how to fix it? > > > > > > > > > > Thanks, > > > > > > > > > > JF > > > > > > > > This happens when the matlab cannot find the control (button, axes, radio button, label and so on) in the .fig file which has a function assigned in the .m file. > > > > > > > > If it is a figure, it is very probably that you change the name of the entire figure (main GUI window). Check the names and try to rename them in the right way. > > > > > > I looked through my file for any phantom controls (both visually and by using the Object Browser) and have not found anything I'm not expecting. The only things that don't have code are the uipanels. I did, however, delete some controls from my GUI recently and I'm pretty sure I was careful to delete the callbacks for all of these controls (it was after I deleted these controls that I started to see this error). Did I not dig far enough when deleting the callbacks? > > > > > > Thanks, > > > > > > JF > > > > I think I got it. > > > > The figure1 is the default tag for the GUI. You created the GUI window, created a CreateFcn function for the GUI when the tag of the window was figure1. After that you changed the name of the tag. > > > > So, go in the main GUI window, right-click, click on Property Inspector, search in the list for Tag and I can bet that the name is not 'figure1' anymore. You have more choices: change the name of the function to fit for the new Tag or delete the function if it contains no code (it will be automatically generated with the right name if you will ever need it in the future). > > > > Let me know if this was useful. > > > > Paul > > > > So click on the > > Paul, > > Thanks, I got rid of the error by RE-generating the createfcn for figure1. What I think ACTUALLY was going on was that at one time I generated a createfcn and then deleted it from the M-File. By putting the createfcn back in my GUI.m, I no longer get the error. > > BUT now i have a create function that I don't *think* needs to be there. I have a bunch of panels without create functions and I'm not getting errors for those controls. Any ideas on THIS? Can / how can I delete this create function without generating the error? > > Thanks, > > Thanks! well... remove the FIGURE's CREATEFCN property, then remove the M-file... us |