IApplicationGlobals.Add

Syntax

Add(Name: String; Value: Variant);

Parameters

Name - name of a global variable.

Value - value of a global variable.

Description

The Add method adds a new variable named Name with the Value value to the global variables list.

Example

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

App: IApplication;

Glob: IApplicationGlobals;

Begin

App := WinApplication.Instance As IApplication;

Glob := App.Globals;

Glob.Add("Index", 123);

End Sub Button1OnClick;

After executing the example and pressing the button the Index variable that has the 123 value is added to the global variables list.

See also:

IApplicationGlobals