Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PEMSTATUS()?
Message
From
09/09/1999 10:56:03
 
 
To
09/09/1999 09:49:23
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00262851
Message ID:
00262891
Views:
21
>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?

IF TYPE("THIS.Parent.Parent.Name") = "C"

*does a grandparent pbject exist?
ENDIf
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform