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:
01247743
Views:
28
This message has been marked as the solution to the initial question of the thread.
Hi,

>What is different that gets me bitten while coding?

The object reference might return "O", even if the object doesn't exist anymore. That's for example the case if you remove an object that has been added to the parent class, or with COM servers that have been shut down. TYPE returns "O" in this case, because you only check the type of the object reference, not the object itself. By using Name, you force VFP to access the object. If the object doesn't exist anymore, TYPE for the name returns "U".
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform