Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl - GetCtrl() function question  
	
		
		
			| ArrayCtrl - GetCtrl() function question [message #61740] | 
			Sun, 20 July 2025 08:08  | 
		 
		
			
				
				
				
					
						  
						lmonda
						 Messages: 7 Registered: March 2025  Location: USA
						
					 | 
					Promising Member  | 
					 | 
		 
		 
	 | 
 
	
		Hi All, 
 
I am migrating a Upp project from a older version of upp to newer version (17490). 
I have an issue with the ArrayCtrl. 
Basically we add controls to the array ctrl in the constructor using SetCtrl(). 
Later when the tab page is chnaged , the controls are accessed from arrayctrl using GetCtrl() to access them. 
But it seems to return null, and triggers an assert at ASSERT(pStepTimeCtrl) 
This same code worked in previous upp version, Can some one help? 
 
MAX_STEPS_PER_TEST = 50; 
StepTimeColumn = 1; 
//constructor 
for(int row =0; row< MAX_STEPS_PER_TEST; row++) 
{ 
    
   XTEditDoubleSpinExt *pStepTimeCtrl  = new  XTEditDoubleSpinExt;  
   _StepSettingsView._Grid.SetCtrl(row, StepTimeColumn, pStepTimeCtrl); 
} 
 
Ontabchange() 
{ 
      for(int row =0; row< MAX_STEPS_PER_TEST; row++) 
      { 
          XTEditDoubleSpinExt *pStepTimeCtrl; 	 
          pStepTimeCtrl = dynamic_cast<XTEditDoubleSpinExt *> 
            (_StepSettingsView._Grid.GetCtrl(row, StepTimeColumn).GetFirstChild()); 
            ASSERT(pStepTimeCtrl); 
             
       } 
} 
		
		
		[Updated on: Sat, 26 July 2025 22:30] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 08:29:00 CET 2025 
 Total time taken to generate the page: 0.05319 seconds 
 |