From: exosceleton on 30 Jul 2010 03:34 Is it possible to change for instance the figure's WindowKeyPressFcn from another GUI callback. when i: get(handles.figure1,'WindowKeyPressFcn') the result is a "function_handle" If i: set(handles.figure1,'WindowKeyPressFcn','GPRPlot(''WindowKeyPressAlternative'',hObject,eventdata,guidata(hObject))') when the Fcn is activated i get error: Undefined function or variable 'hObject' if i set a cell: set(handles.figure1,'WindowKeyPressFcn',{'GPRPlot(''WindowKeyPressAlternative'',hObject,eventdata,guidata(hObject))'}) i get: ??? Invalid function name 'GPRPlot('WindowKeyPressAlternative',hObject,eventdata,guidata(h'. How do i set the callback from a script?
From: exosceleton on 30 Jul 2010 04:07 OK {@WindowKeyPressAlternative,guidata(hObject)} works
|
Pages: 1 Prev: Element-wise matrix integraton Next: Simple oop question |