GUI giving errors after upgrading Matlab to R2014b
Ältere Kommentare anzeigen
Recently upgraded to R2014b. I've been getting a brand new warning type error from Matlab from a GUI which was working before the upgrade. When I select a radio button from a radio button group I get:
Undefined function handle.
Error while evaluating UIControl Callback
Now this is doesn't prevent the code from working but is really annoying. The it only happens when I change buttons so I think it's probably associated with this piece of code.
function cutplane_SelectionChangeFcn(hObject, eventdata, handles)
% hObject handle to the selected object in cutplane
% eventdata structure with the following fields (see UIBUTTONGROUP)
% EventName: string 'SelectionChanged' (read only)
% OldValue: handle of the previously selected object or empty if none was selected
% NewValue: handle of the currently selected object
% handles structure with handles and user data (see GUIDATA)
switch get(eventdata.NewValue,'Tag')
case 'rcut'
handles.cuttype='r1d';
case 'thetacut'
handles.cuttype='theta1d';
case 'zetacut'
handles.cuttype='zeta1d';
case 'fluxcut'
handles.cuttype='r2';
case 'polcut'
handles.cuttype='theta2';
case 'rzcut'
handles.cuttype='zeta2';
case 'threedcut'
handles.cuttype='3D';
end
guidata(hObject,handles);
guiupdate(hObject,handles);
Now I see that this should probably be SelectionChangedFcn rather than SelectonChangeFcn but when I make this change then basically the propery of the fig isn't correct for the GUI.
Any thoughts?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!