Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get fully qualified object name from object reference?
Message
 
À
07/01/2009 14:03:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01371824
Message ID:
01371913
Vues:
23
>How can I get the fully qualified object name from reference to the object?
>
>For instance a Grid on a Page in a PageFrame on a Form...
>
>So in a method on the Grid, I can just use 'this.', but this full object heirachy is ''thisform.pageframe1.pageMtlSummary.grid1'
>
>How can I resolve the full path name from just the object reference?

First let's clear up the fact that you are not looking for a path name, you are looking for a containership heirarchy. You can get the containership by walking from the inner most object out looking at the parent property, so from a method in the grid you can ...
?This.parent.name && page's name
?this.parent.parent.name && pageframe's name
?this.parent.parent.parent.name && Form's name
etc. until you run into a non-object in the parent property or no parent property.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform