Borrar filtros
Borrar filtros

GUI

1 visualización (últimos 30 días)
Shree Nath
Shree Nath el 5 de Jun. de 2012
I had created a simple GUI counting the number of cllicks and displaying it in an Edit Box. I noticed two problems :-
1. the gui doesn't work if we directly run the .fig file.. we have to run its .m file first. Any comments?
2. on closing some of my gui's, it generates these type of errors -
*??? Error using ==> feval Undefined function or method 'figure1_DeleteFcn' for input arguments of type 'struct'.
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> loadimg [dats my file name] at 43 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)loadimg('figure1_DeleteFcn',hObject,eventdata,guidata(hObject))
??? Error using ==> delete Error while evaluating figure DeleteFcn*
dont understand what this delete function is matlab talking about.. i just used a push button callback for counting and displaying the number of clicks.. no other function..

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Jun. de 2012
1. Correct. You must run the .m file. .fig files are not designed to be executable.
2. You renamed your .m file and .fig file outside of GUIDE. When you do that, GUIDE gets messed up. If you want a different name, you have to do it within GUIDE. Now you will need to check all the code in the .m file to look for references to figure1 and you will need to use the property inspector to go through all the object properties in your .fig file looking for references to figure1 . You will probably find it easier to delete your existing .m and .fig file and to rebuild it in GUIDE.
  1 comentario
Shree Nath
Shree Nath el 6 de Jun. de 2012
nopes.. i dont think i renamed anything..
btw any idea wats this DeleteFcn error?
also, is it necessary to have the CreateFcn function for every object?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by