Use guidata(hObject, handles) for non-callback functions?
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    chlor thanks
 el 1 de Ag. de 2016
  
    
    
    
    
    Comentada: chlor thanks
 el 1 de Ag. de 2016
            I am in the process of writing a shared function, say "function sharingiscaring()" to used for different CallbackFcns.
I realize this shared function "function sharingiscaring()" will generate some cell arrays, say "care1", "care2", that I would like to use in other callback functions.
In this case, is it necessary to add in commands such as
handles.care1=care1;
handles.care2=care2;
and also end the "function sharingiscaring()" with
guidata(hObject, handles)
like what is usually done for callback functions?
I will appreciate any help since I just started learning GUI and would like to make sure my code is written correctly...Thank you again for reading!
0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 1 de Ag. de 2016
        No, that is not needed. You can return the values as outputs from the funtion:
function [care1, care2] = sharingiscaring()
  ...
Más respuestas (0)
Ver también
Categorías
				Más información sobre Interactive Control and Callbacks 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!

