findobj does not work
    6 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Rocky Zhang
 il 4 Mar 2020
  
    
    
    
    
    Commentato: Rocky Zhang
 il 5 Mar 2020
            When the gui main program is running, I use findobj('Name', 'Gui_Main_Program');
This command does not work in timer callback function. It neither work in Matlab command window.
I see everyone says do not use global variables, so I put data in gui_main_hObject.UserData.
Thank you.
2 Commenti
  Star Strider
      
      
 il 4 Mar 2020
				The first argument to findobj must the the handle to the object you want to use it with.  
  Walter Roberson
      
      
 il 4 Mar 2020
				No, https://www.mathworks.com/help/matlab/ref/findobj.html shows multiple syntaxes in which there is no object passed
Risposta accettata
  Walter Roberson
      
      
 il 4 Mar 2020
        Either there is no object with exactly that name, or else the handle of it is not visible.
What shows up for
get(findall('type', 'figure'), 'Name')
3 Commenti
  Walter Roberson
      
      
 il 4 Mar 2020
				get(findall(0, 'type', 'figure'), 'Name')
I keep forgetting that findall requires a first parameter
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Creating, Deleting, and Querying Graphics Objects in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


