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: 1 Registered: March 2025 Location: USA
|
Junior 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)GET_FIRST_CHILD);
ASSERT(pStepTimeCtrl);
}
}
[Updated on: Sun, 20 July 2025 22:23] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Jul 26 04:01:23 CEST 2025
Total time taken to generate the page: 0.03483 seconds
|