Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Class VCX Parent Class Reference
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01056796
Message ID:
01056819
Views:
18
Juan,

The class can run this test to see if it's a contained object or not:
if ( type( "this.parent" ) == "U" )
   * I am a poor orphaned object all alone in a vast sea of objects
endif
>I have a custom class (.vcx) that I used in code (CREATEOBJECT(.....)) and also by dropping the class in forms.
>In the init of the form I have code that runs all the time. The problem is that in this code I reference thisform.
>When I create a object with CREATEOBJECT(.....) i don't have a form as a parent class for the object and the code crash. I can't use try...catch with a VARTYPE(object.parent) because class is used in vfp7 and vfp9 environment.
>I couldn't find a command that can tell me if the object has a parent class or not.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform