Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object in form tests T for existance then error
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Object in form tests T for existance then error
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Novell 5.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01106772
Message ID:
01106772
Views:
69
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?
Next
Reply
Map
View

Click here to load this message in the networking platform