GetObjectTarget(Object: IMetabaseObjectDescriptor): IUiCommandTarget;
Object. Description of a repository object, with which an operation is to be executed.
The GetObjectTarget method creates an object that executes some operations with repository objects using reserved commands.
The list of commands available for objects is given in description of the IUiCommandTarget.Execute method.
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: