I am encountering one of the oddest things I have encountered in VFP.
I have a primary form, in which various container classes are brought back and forth into existence, but always with the same object name, "oMainPane."
In my code, I am testing for the existence of the object. If the object exists, it is deleted, and then recreated using the new desired class:
IF PEMSTATUS(THISFORM, 'oMainPane', 5)
THISFORM.REMOVEOBJECT('oMainPane')
ENDIF
THISFORM.AddObject('oMainPane', 'Trans')
However, although the code is passing the test for existence of the oMainPane object, when it hits the call to REMOVEOBJECT, the code fails, citing "Unknown member OMAINPANE."
I have put other code in there, and verified that the oMainPane object WAS there, I almost want to question whether the REMOVEOBJECT is somehow occurring more than once, but this is pure speculation ... I don't know how else this could happen.
Can anyone offer suggestions?