Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Diff. between TYPE() of object and object.name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01247740
Message ID:
01247961
Vues:
31
This message has been marked as a message which has helped to the initial question of the thread.
Hi,

> as you have been using it have not encountered a problem with it, then I guess is it safe.

VARTYPE() works fine in those cases where the object reference has been set to NULL. It doesn't work well when the object is released, but the reference not updated. This happens mostly with COM objects:
ox = CreateObject("Word.Application")
ox.Quit()
? Vartype(ox)   && prints 'O'
With COM objects I'd use TYPE(), except when my intention is to check whether I assigned an object reference at all. Another scenario where I frequently use TYPE() instead of VARTYPE() is accessing the ActiveForm and ActiveControls properties.
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform