Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do I have a parent?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00384583
Message ID:
00384594
Views:
34
>What is the best way to tell if an object has a parent? If you check the VARTYPE(This.Parent) you get a FoxPro error if the parent doesn't exist. The PEM exists but you can't check its VARTYPE. The only KLUGE I have been able to come up with is to check if the UPPER of the Object Hierchary = the UPPER of the Object Name. Is there a better way?

IF TYPE("this.parent") = "O" && parent exists
...
ENDIF
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform