Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PEMSTATUS()?
Message
De
09/09/1999 09:49:23
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
PEMSTATUS()?
Divers
Thread ID:
00262851
Message ID:
00262851
Vues:
58
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
Fil
Voir

Click here to load this message in the networking platform