Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing a objects existence
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00366567
Message ID:
00366607
Views:
14
>if type('myobject') == "O" AND !isnull(myobject)
>myobject.destroy()
>endi

Eric,

Calling the destroy method does not do anything but run the code. You can also reduce the IF statement for all but SCATTER NAME objects by doing;
IF TYPE("MyObject.Name") = "C"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform