>>
>> loObject = THISFORM.oldItem
>> THISFORM.RemoveObject(loObject)
>>
>>When I run this I get 'LOOBJECT not Found' error.
>
>>>Pass the name of the object.
>>>thisform.RemoveObject("olditem")
>
>I tried your syntax (I think I did that once before). Here is the error which appears:
>
> Unknown Member OLDITEM
> METHOD myForm.RemoveObject()
> LINE: 0
Are you sure it's an object? In order to use RemoveObject(), you need to have added the object (not property) using AddObject() to the container; it doesn't work to get rid of properties added via AddProperty(). For example, you can use it to remove a control from the form, but not to remove a form property.
EG:
DEFINE CLASS MyForm AS FORM
MyProperty = 42
ADD Object Spin1 AS Spinner
PROCEDURE INIT
thisform.RemoveObject('Spin1')
thisform.RemoveObject('MyProperty')
ENDPROC
ENDDEFINE