Hi all,

I have an ado-file with various sub-programs. Each of the sub-programs do some things with frames, which have temporary names. How can I parse a frame from a sub-program to the calling program?

The make my point clear, here is what I thought might work:

Code:
program main
        ...
        MakeControlFrame
        frame change `s(frame)'
        <do something on the frame created with MakeControlFrame>
       ...
end

program define MakeControlFrame, sclass
        tempname thisframe
        frame create `thisframe'
        frame change `thisframe'
        sysuse auto
        sreturn local frame "`thisframe'"
end
The approach works in the sense that -frame change `s(frame)'- expands to -frame change __000000-, but the frame -__000000- does not exist in the main-program. This, of course, makes sense since it is temporary to MakeControlFrame. But is there a way to parse frames with tempnames between sub-programs of one program? Or should we use permanent names to this?

Any advice highly appreciated.

Uli