Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uncontained Class
Message
De
29/03/1999 10:44:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Uncontained Class
Divers
Thread ID:
00202995
Message ID:
00202995
Vues:
34
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform