Azzera filtri
Azzera filtri

GUI

1 visualizzazione (ultimi 30 giorni)
Shree Nath
Shree Nath il 5 Giu 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..

Risposta accettata

Walter Roberson
Walter Roberson il 6 Giu 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 Commento
Shree Nath
Shree Nath il 6 Giu 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?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su App Building in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by