IMetabaseCustomForeEvents.Add

Syntax

Add(Id: String): IMetabaseCustomForeEvent;

Parameters

Id. Custom event identifier.

Description

The Add method adds a new custom event to the collection.

Comments

To clear the collection of custom events, use the IMetabaseCustomForeEvents.Clear method.

Examples

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:

IMetabaseCustomForeEvents