Information générale
Catégorie:
Programmation Orientée Object
I have created a master class that adds another class to
it via ADDOBJECT(). The master class was added to a form
so that when the program is started from the form the lowest
level class needs to check a property on the form as follows:
This.Parent.Parent.cmbFileID.DisplayValue
That is, I have the following hierachy (sp?):
1. Form
2. MainClass
3. SubClass
Now, I would also like to run the code simply by instatiating
the MainClass (no form used). Therefore, I need to conditionally
get the form value only if it exists.
So in the INIT() of the subclass I thought the following code
would work:
IF PEMSTATUS(This.Parent.Parent,Class,5)
added code here
ENDIF
The PEMSTATUS() call fails since the form does not exist. The
actual error is Parent is not an object.
How can I conditionally check to see if the code was kicked off
from the mainclass or the form?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement