Hello there,
I have a gui and sometime ago I added a function "freemodetoggle" in it.Then I removed it.Now when I add another function using the code given below,matlab gives below error about old function.How to remove that old function?I couldnt figure out it for hours.Thank you
??? Undefined function or method 'freemodetoggle' for input arguments of type 'struct'.
??? Error using ==> axes
Error while evaluating figure KeyPressFcn
This is the code :
function freemodetoggle(src,evnt)
%keyPressFcn automatically takes in two inputs
%src is the object that was active when the keypress occurred
%evnt stores the data for the key pressed
%brings in the handles structure in to the function
handles = guidata(src);
k= evnt.Key;
if strcmp(k,'space')
pause(0.01) %allows time to update
handles.pushed=1
end
Also I used this in opening function :
set(handles.figure1,'KeyPressFcn',@freemodetoggle);
Please help me.
|
|
0
|
|
|
|
Reply
|
Lina
|
2/10/2011 12:22:28 AM |
|
There is nothing about "freemodetoggle" in the code.But matlab still gives this error.Can it be hidden somewhere in the gui .fig file?
|
|
0
|
|
|
|
Reply
|
Lina
|
2/10/2011 12:35:04 AM
|
|