The following class compiles successfully:
DEFINE TEMP-TABLE ttTest FIELD id AS INTEGER FIELD NAME AS CHARACTER.
METHOD PUBLIC VOID TestMethod( BUFFER p-ttTest FOR ttTest ):
UNDO, THROW NEW Progress.Lang.AppError("METHOD NOT IMPLEMENTED").
If I try to define an interface for this class I get this error (on the METHOD line).
"Only datasets, temp-tables, and properties may be defined in an interface. (13149)"
DEFINE TEMP-TABLE ttTest FIELD id AS INTEGER FIELD NAME AS CHARACTER. METHOD PUBLIC VOID TestMethod(BUFFER p-ttTest FOR ttTest).
Removing the parameter allows it to compile successfully.
How can I define an interface method that matches this class?
As Peter noted you can use a TABLE parameter (to pass the complete temp-table) or a HANDLE parameter for a buffer. The challenge with using a TABLE parameter is that you will be passing more data than you may want to pass and the challenge with using a HANDLE for a buffer is that the method will need to use dynamic programming to access the information.
The issue you have raised is a limitation with the implementation of interfaces. I have added this issue to the Language team’s backlog.
Please note, that if you did not want to enforce the method signature via an Interface, the existing method syntax does support passing a buffer. This limitation exists with the ABL’s ability to enforce the method signature via interfaces.
Sr. Development Manager
Dec 2019 and 12.1 gives the same compile error. How is that backlog going?