Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for presence of an object
Message
 
 
À
29/01/2002 18:37:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00612283
Message ID:
00612553
Vues:
22
>Hi Sergey
>
>>
IF TYPE("Thisform.myobject.Name") = "C"
>
>At the risk of being pedantic, the above is true except in two cases:
>
>[1] The object was created using SCATTER NAME from a table which does not include a field called "Name". The EMPTY base class (used with SCATTER NAME) does not have any exposed properties at all - not even a name.
>
>[2] The name property has been flagged as 'Hidden' (and is called from anywhere but the root class) or 'Protected' (and is called from anywhere but root or sub class).
>
>In either case the above line of code will fail. The only really safe test is still:
>
>
IF TYPE( "Thisform.myobject" ) = "O" AND NOT ISNULL( Thisform.myobject )
Hi Andy,

You're right. I'm curious why would somebody make "Name" property Protected/Hidden?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform