Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return value of NewObject()
Message
De
24/04/2002 11:02:00
 
 
À
24/04/2002 10:50:45
Beth Wetherbee
Virginia Beach Public Schools
Virginia Beach, Virginie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00648685
Message ID:
00648694
Vues:
20
Hi Beth.

>Can someone tell me why This.NewObject() would return a .T. even if the object being created by NewObject did not instatiate?

The VFP Help file doesn't indicate any return value for the NewObject method, so I'm guessing that it always returns .T. I agree that it would be nice if it returned .F. if the instantiation didn't work, but in the meantime, you can use code like the following instead:
This.NewObject('NewMember', ...)
if type('This.NewMember.Name') = 'C'
* object was created
endif
Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform