Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining if a Property Exists
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00534933
Message ID:
00535173
Vues:
15
>>>PemStatus() or Type()... Is there advantage of using one over the other?
>>If you're simply trying to determine whether or not the property exists, TYPE() takes less code.
>
>Here's something obscure, be careful with type() because you'll fire Access methods of the property you want. That may be something you want, or not. That also includes this_access, I've used parameters objects that will automatically create properties you ask for on the object, and using Type() returned something I didn't want.

It possibly could produce some undesired effects depending on the nature of the code in the _Access event.

>If you just wanna know if the prop is there, PEMStatus() is the safest way to go.

There maybe a performance hit, but it's no safer than AMEMBERS().
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform