loForm = NEWOBJECT("Form") loForm.AddObject("Test","Label") loTest = loForm.test loForm.RemoveObject("test") ?loTest.Name && This raises an error!Also what is happening is, that the same code that is called from the button
THISFORM.DoProcess
works fine, and when using the key F10ON KEY LABEL F10 _SCREEN.ACTIVEFORM.DoProcess()the problem occurs. There must be a connection with the ON KEY, the code itself must be good.
>local lcName >FOR lnNr = lnNumberOfBatches TO 1 STEP -1 > * > loBatch = THIS.TicketsDisplay.Controls[lnNr] > loBatch.DoCreateCertificate(lnBatchNr) > lcName = loBatch.NAME > loBatch = .null. > THIS.TicketsDisplay.REMOVEOBJECT( lcName ) > * >ENDFOR >>