Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding Top-Most Object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01239978
Message ID:
01239997
Vues:
6
>I might have that class on _Screen or on a Form. I need a reference to
>the _Screen object or the Form object, depending on which on the
>class is on.
>
>I could to:
>
>  IF TYPE("ThisForm") = "O"
>    oParent = ThisForm
>  ELSE
>    oParent = _Screen
>  ENDIF
>
>
>But I was wondering if there was a more elegant way.
>

Kevin,

not sure if this is any more elegant ....
lo = THIS
DO WHILE TYPE('lo.parent') = "O" 
	lo = lo.PARENT
ENDDO
WAIT WINDOW lo.NAME
Nigel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform