Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if an object exists
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00098172
Message ID:
00098388
Vues:
41
Richard:

o1 = createobject( "form" )
? type( "o1" )
? type( "o1.Name" )
o1 = .null.
? type( "o1" )
? type( "o1.Name" )

o1 is still type O, but it's no longer an object.

>I'm mostly curious, and totaly new to the Universal Thread, but wouldn't it be better to test TYPE didn't return an "O", like the following?
>
> IF TYPE([oControl.Name]) != "O"
> *the objet does not exist
> *create it if you need it
> ENDIF
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform