Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to say if an Object exist or not
Message
From
22/09/2000 01:04:05
 
 
To
12/09/2000 04:30:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00415299
Message ID:
00419541
Views:
14
>Before this code line i want to test if this Object text1 exist how can I do .

It is possible for type('MyObject') to return "O" when teh object doesn't exist. Because when an variable is set to NULL it retains its variable type. So you can try these methods to absolutley make sure you're dealing with a live object:

?type('oObject') and not isnull(oObject)
?type('oObject.Name') &&Or any other property, if its not a "U" you've got an object
?vartype(oObject) && Vartype is faster than type and won't return O for a NULL variable.
Previous
Reply
Map
View

Click here to load this message in the networking platform