Object.History Command

Purpose

Opens a standard dialog box of object history.

Parameters of Use

None

Application Features

When the command is executed, the object changes dialog box opens for objects. If the object is added to the version control system, a dialog box opens with publication history for the object.

Fore Example

Executing the example requires a form, the Button1 button on the form and a unit with the UserFunction identifier.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        Mb: IMetabase;
        ObjDes: IMetabaseObjectDescriptor;
        Target: IUiCommandTarget;
    Begin
        MB := MetabaseClass.Active;
        ObjDes := MB.ItemById("UserFunction");
        Target := WinApplication.Instance.GetObjectTarget(ObjDes);
        Target.Execute("Object.History"Null);
    End Sub Button1OnClick;

Clicking the button opens a standard unit change dialog box. If the unit is added to the version control system, a dialog box opens showing the history of unit publications.

Fore.NET Example

Executing the example requires a .NET form, the Button1 button on the form, and a unit with the UserFunction identifier.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Fore;
Imports Prognoz.Platform.Interop.Ui;

    Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    Var
        Mb: IMetabase;
        ObjDes: IMetabaseObjectDescriptor;
        WinApp: WinApplicationClassClass = New WinApplicationClassClass();
        Svc: IForeServices;
        RunContext: ForeRuntimeContext;
        Target: IUiCommandTarget;
    Begin
        MB := Self.Metabase;
        ObjDes := MB.ItemById["UserFunction"];
        Svc := MB As IForeServices;
        RunContext := Svc.GetRuntime().Context;
        Target := WinApp.Instance[RunContext].GetObjectTarget(ObjDes);
        Target.Execute("Object.History"Null, RunContext);
    End Sub;

Clicking the button opens a standard unit change dialog box. If the unit is added to the version control system, a dialog box opens showing the history of unit publications.

See also:

IUiCommandTarget.Execute