Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Diff. between TYPE() of object and object.name
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01247740
Message ID:
01247961
Views:
30
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform