Question How to get current buffers from a handle

patelspam

Member
Hello! Is there a way to get the current buffers (temp-tables and tables) from program X just by using his handle in program Y? I know i can create a method in program X that iterates the buffers and returns them but i want to be able to do that dynamically without having to edit thousands of programs....

JP
 
Maybe you could share some simple sample code that shows what you have so far and where you need these current buffers?

I'm having difficultly understanding how it is that you are able to iterate & return them but somehow don't know what they are.
 
AFAIK You cannot access the handle of a static buffer unless the procedure contains a procedure or function that returns the handle

e.g suppose you want to give access to a buffer mybuffer in a procedure than you can add an internal procedure to the procedure X that should expose it's buffer like

Code:
procedure GetHandle:
       def output param ohandle as handle no-undo.

       ohandle = buffer mybuffer:handle.
end.

from outside in procedure Y, provided that you have a handle to procedure X you can then

Code:
run gethandle in Xprochandle (output mybufferhandle) .
 
Back
Top