General information
Category:
Object Oriented Programming
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?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only