Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining whether a control exists.
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00453834
Message ID:
00453966
Views:
17
Vlad,

Yes I use the TYPE() function for it. I don't care about .001 versus .006 for a single line of code that is not in a loop. I don't even care if it is in a loop until the loop count gets up to a few thousand iterations.

PEMSTATUS() has had problems with object references not being released in the past so I took a different approach and haven't seen any need to change it yet. TYPE() also works for checking objects that are not part of the PEMs of another object so it is universal for checking the existance of an object. The only baseclass that my approach doesn't work for is the SCATTER NAME (because the object doesn't necessarily have a property named Name) and some COM objects (I handle COM objects differently anyway).

I do use PEMStatus() for other things though.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform