Add(Name: String; Value: Variant);
Name - name of a global variable.
Value - value of a global variable.
The Add method adds a new variable named Name with the Value value to the global variables list.
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: