Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Uncontained Class
Message
From
29/03/1999 10:44:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Uncontained Class
Miscellaneous
Thread ID:
00202995
Message ID:
00202995
Views:
32
I have created a class that I instantiate as follows:

THISFORM.oClass = CREATEOBJECT("ClassName", Param1, Param2)

Everything works fine--all methods and properties are available as expected, i.e., THISFORM.oClass.CheckForConflicts() works fine. However, whenever I try to refer back to THISFORM from within a class method, I get an error. If I, for example, attempt the following from within THISFORM.oClass.CheckForConflicts(), it bombs:

THISFORM.oDataManager.Replace([Parameter list])

The error states that object is not contained in a form (error #1938). I work around the problem by passing THISFORM as a pointer and storing it as a property in the Init method of the class. But I don't get it: If THISFORM.oClass.[WHATEVER] works, how can oClass not be contained in a form??

Thanks, out there, y'all, for any light you can shed.
John
Next
Reply
Map
View

Click here to load this message in the networking platform