IBaseMethod.Bind

Syntax

Bind;

Description

The Bind method initializes the custom method.

Comments

The list of parameters is updated when initializing.

Example

Executing the example requires that repository contains a custom Fore method with parameters.

Add links to the Fore and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    SharedParams: ISharedParams;
    Methods: IForeMethods;
    Method: IForeMethod;
    MethodParams: IForeMethodParams;
    Param: IForeMethodParam;
    i: Integer;
Begin
    Mb := MetabaseClass.Active;
    SharedParams := Mb.SpecialObject(MetabaseSpecialObject.SharedParams).Bind 
As ISharedParams;
    Methods := SharedParams.Methods;
    Method := Methods.Item(0);

    If Not IsNull(Method) Then
        
Method.Bind;
        MethodParams := Method.Params;
        
For i := 0 To MethodParams.Count - 1 Do
            Param := MethodParams.Item(i);
            Debug.Write(
"Parameter: " + Param.Param);
            Debug.WriteLine(
". Default value: " + Param.DefaultValue);
        
End For;
    
End If
End Sub UserProc;

On executing the example the first custom method will be initialized. The console dialog box will display names and default values of all method parameters.

See also:

IBaseMethod