Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing if an object has a property or method
Message
De
11/02/1999 15:35:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00186691
Message ID:
00186728
Vues:
19
>Is there a simple way to test if an object has a property or a method? I could use amembers then check the array, but I was wondering if there is a VFP command that alread does this.

Evan,

llHasProperty = PEMSTATUS("cObjectName","cPEMName",5) is the normal way of testing for a property/event/method.

Beware the traps, though. For example PEMSTATUS("cLablename","TabStop",5) where cLabel is derived from the label class will return true -- even though a label does not have an exposed tabstop property.

Generally, PEMSTATUS() will tell you whether the object has a property, but does not tell you if it is actually available to use. It may be hidden, protected or out of scope.

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform