Add(Id: String): IMetabaseCustomForeEvent;
Id. Custom event identifier.
The Add method adds a new custom event to the collection.
To clear the collection of custom events, use the IMetabaseCustomForeEvents.Clear method.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
CustomClassExtender: IMetabaseCustomExtender;
Events: IMetabaseCustomForeEvents;
ForeEvent: IMetabaseCustomForeEvent;
Begin
MB := MetabaseClass.Active;
//Get custom classes container
CustomClassExtender := Mb.SpecialObject(MetabaseSpecialObject.CustomExtender).Edit As IMetabaseCustomExtender;
//Get the list of events
Events := CustomClassExtender.Events;
ForeEvent := Events.Add("EVENT_ENTER");
ForeEvent.Name := "Application login";
(CustomClassExtender As IMetabaseObject).Save;
End Sub UserProc;
on executing the example a new custom event will be created.
See also: