KeepEdit: Boolean;
The KeepEdit property determines whether the repository object is in the edit state after creation.
Available values:
True. After executing the IMetabase.CreateObject method the created object is in the edit state. This allows for adjusting the created object to the necessary interface and to set specific properties.
False. To change specific properties of the created object, open it for edit using the IMetabaseObjectDescriptor.Edit method.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
m: IModule;
Begin
MB := MetabaseClass.Active;
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_MODULE;
CrInfo.Parent := MB.Root;
CrInfo.KeepEdit := True;
m := MB.CreateObject(CrInfo) As IModule;
m.Text := "Sub Main;" + #13 + #10 +
"Begin" + #13 + #10 +
"End Sub Main;";
(m As IMetabaseObject).Save;
End Sub UserProc;
After executing the example a new unit is created in the repository root. To specify the Main procedure in the unit the structure remains open for editing after executing the I Metabase.CreateObject method.
See also: