IWinApplication.GetObjectTarget

Syntax

GetObjectTarget(Object: IMetabaseObjectDescriptor): IUiCommandTarget;

Parameters

Object. Description of a repository object, with which an operation is to be executed.

Description

The GetObjectTarget method creates an object that executes some operations with repository objects using reserved commands.

Comments

The list of commands available for objects is given in description of the IUiCommandTarget.Execute method.

Example

Executing the example requires that the repository contains a table with the Table_1 identifier.

Sub UserProc;
Var
    Mb: IMetabase;
    ObjDes: IMetabaseObjectDescriptor;
    Target: IUiCommandTarget;
Begin
    MB := MetabaseClass.Active;
    ObjDes := MB.ItemById("Table_1");
    Target := WinApplication.Instance.GetObjectTarget(ObjDes);
    Target.Execute("Object.Open"Null);
End Sub UserProc;

On executing the example the selected repository table is opened.

See also:

IWinApplication | IUiCommandTarget