Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find out the Class where the property was defined
Message
De
03/01/2006 09:55:18
 
 
À
03/01/2006 07:46:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01082552
Message ID:
01082590
Vues:
12
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform