Why guidata() doesn't work on an user function?
Mostrar comentarios más antiguos
Hi,
I have a variable stored in handles.switches.
I get into a callback function. I change this variable and at the end I execute guidata(hObject, handles) and this variable is updated. Fine.
The problem is if I update this variable in a user function inside this callback function. The handles.switches then is not updated although I execute at the end guidata(hObject, handles).
What can I do to update this variable inside other function?
I tried using set but it gives me an error. I am not using well this command.
>> set(handles.switches, 'UserData', work_comb);
Error using handle.handle/set
Invalid or deleted object.
But if I make a breakpoint at this line and write down handles.switches, the variable exists! I don't know what's going on...
Thanks!
1 comentario
Mike D.
el 19 de Sept. de 2016
Use appdata instead.
Respuesta aceptada
Más respuestas (1)
Dani Tormo
el 5 de Dic. de 2012
0 votos
Categorías
Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!