Item(Name: String): Variant;
Item[Name: string]: object;
Name. Name of a global variable.
The Item property determines value of the specified global variable.
The Name parameter is case-sensitive.
If the specified global variable does not exist, on reading the property returns Null; if the value is set, a variable is created with the specified name and value.
Executing the example requires a form.
Add a link to the UI system assembly.
Sub UserProc;
Var
App: IApplication;
Glob: IApplicationGlobals;
Begin
App := WinApplication.Instance As IApplication;
Glob := App.Globals;
Glob.Item("META") := "Repository";
End Sub UserProc;
After executing the example the value of the global variable in the META application is changed. If this variable does not exist, it will be created.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Ui;
…
Public Sub UserProc();
Var
Wa: WinApplicationClassClass;
App: IApplication;
Glob: IApplicationGlobals;
Begin
Wa := New WinApplicationClassClass();
App := Wa.Instance[Null] As IApplication;
Glob := App.Globals;
Glob.Item["META"] := "Repository";
End Sub;
See also: