If I change a property of a UIControl in a callback do I still need to call setappdata before exiting?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Eugene Davis
el 30 de Jul. de 2018
Comentada: Eugene Davis
el 30 de Jul. de 2018
I start my call back with
handles = getappdata(gcf,'handles');
So I have created a local copy of the handles structure.
Then I modify a control with
set(handles.Batch,'value',1);
Since handles.batch is a handle, don't I automatically change its properties without having to call
setappdata(gcf,'handles',handles);
0 comentarios
Respuesta aceptada
Walter Roberson
el 30 de Jul. de 2018
Correct, you only have to call setappdata() if you modify the structure itself.
Note: it is more common to use guidata() to manage a handles structure. It does the same thing as setappdata() of a property named UsedByGUIData_m, but people are more accustomed to reading guidata()
Más respuestas (0)
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!