Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get fully qualified object name from object reference?
Message
 
To
07/01/2009 14:03:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01371824
Message ID:
01371913
Views:
16
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform