Oops..
That is returning it with the root being the form name, and for some reason THAT is failing when used in a EVALUATE call.
It returns
"formquote.pageframe1.pageMtlSummary.grid1"
but, when I pass that through Evalulate("formquote.pageframe1.pageMtlSummary.grid1"), it does not resolve it. It says "object formquote is not found."
If the root is ThisForm it does work, but that is not what the sys() method returns.
If I pass "thisform.pageframe1.pageMtlSummary.grid1" into Eval, it works fine.
I tried '_screen.'+sys(1272,loGrid) and '_vfp.'+sys(1272,loGrid)' but that did not work either.
The GridExtra.Setup() does an eval on GridExtra.GridExpression, and that is where it fails.
It seems to want 'thisform.PageFrame1.PageMtlSummary.Grid1', which I previously was hard-coding, not 'formquote.pageframe1.pageMtlSummary.grid1'. You can see that I am trying to refactor the grid reference to one place at the top of the code.
Here is the code from the Activate() event on the Page:
Local lcAlias
Dodefault()
lcAlias='csrSummaryMtl'
loGrid=this.oLineItemsGrid
If thisform.lMtlSummaryCursorReady=.f.
loGrid.RecordSource=''
thisform.getSummaryMtlRecords(QuoteInf.quote_no, lcAlias)
loGrid.RecordSource=lcAlias
loGrid.set_header_captions()
loGrid.AutoFit()
thisform.lMtlSummaryCursorReady=.t.
Iif(PemStatus(this, 'GridExtra', 5), this.RemoveObject('GridExtra'), null)
loGridExtra=this.AddObject('GridExtra', 'GridExtra')
this.GridExtra.GridExpression=Sys(1272,loGrid)
this.GridExtra.setup()
endif
thisform.calcSummaryMtl(lcAlias)
thisform.Refresh()
>>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?
>
>sys(1272)