External Interfaces
The External Interface definition type is used to make relations visible between reports that call an external library and the external interface definition.
It is important to note that the actual external library is not being accessed, this object is merely a visual aid to help developers keep track of all the objects where the external library is called.
Creating an External Interface Definition
To create a new External Interface Definition, do as follows:
- Open the folder for the application to which you want to add the external
interface definition.
This is done from the Repository window. - Select the folder "External Interfaces" which is a subfolder of "Types" or one of the underlying
subfolders and insert a new external interface.
This can be done by right clicking on the selected (sub)folder and choosing "Insert External Interface" from the popup-menu. A dialog box will be displayed:
- Specify the options for the external interface definition in the displayed
window. The name of the External Interface definition should be the same as the external
library name.
In the type panel, you define the type of Type that you want to create, at the moment there is only the type External Interface available. If you selected the subfolder that indicates the correct type when calling the dialog box, this type will be selected automatically. - Click "OK" to add the external interface definition, and to define its settings.
- Select the nodes to set the applicable external
interface definition options and to optionally implement the code.
More details about the screens that are linked to these nodes can be found by clicking the applicable link under "Adjusting an external interface definition". - Save the external interface definition.
The save buttons can be found in the top toolbar of the Developer.
Adjusting an external interface definition
If you double click on an external interface definition, the following options for that external interface definition will appear:
Deleting an external interface definition
An external interface definition can be removed from the repository through the screen "Revision Control".
Using external interfaces
After an external interface has been defined and checked in using the Revision Control, objects that call the external library with the same name as the external interface definition will display a relation to the external interface in the 'Relations' node after being generated.
Example:
A report named 'CALLTEST' is calling an external library named CSharpExternalLibrary.dll
call ('TestCall.CallHello', 'CSharpExternalLibrary.dll')
if getlastresult = ''
sme ('result: ', si-param)
else
sme ('Error in dll CallTest!')
endif
An External Interface object named 'CSharpExternalLibrary' is created, optionally defined and checked in.
After the report has been generated, its 'Relations' node lists the external interface.
And the 'Relations' node of the External Interface lists all the reports where the library is called, with the
called routine listed as comment.