Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find out the Class where the property was defined
Message
From
03/01/2006 09:55:18
 
 
To
03/01/2006 07:46:16
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01082552
Message ID:
01082590
Views:
11
>Hello,
>
>In Run-Time I have a Form with a Control on it.
>This Control inherited from a whole Class Hierarchy
>
>Now, I have a property in the control that was defined somewhere in the Class Hierarchy.
>
>How can I find out which class (in the class hierarchy) defined the property ?
>
>This without instantianting each class in the class hierarchy as that would bring a big performance hit.
>
>
>Thanks for your help

not tested
PROC ClassDefProp(oControl,propName)
PRIVATE CC,ArrayName
for cc=1 to ACLASS(ArrayName, M.oControl)
  if PEMSTAT(ArrayName[m.cc],m.propName,6)
      LOOP
  ENDIF
  return ArrayName[m.cc]
NEXT
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform