ISharedParams.NameResource

Syntax

NameResource: String;

Description

The NameResource property determines the string resource, which values are used for global variables names depending on the repository language.

Comments

A part of the string resource identifier should be used as the value of the given property. The string resource identifier in the resource editor should have following structure:<Identifier that will be passed to NameResource property>_<Identifier of global variable>.

Resources from which the names are taken are determined by the Resource property.

Example

Sub main;

Var

MB : IMetabase;

CrInfo: IMetabaseObjectCreateInfo;

Des: IMetabaseObjectDescriptor;

Obj: IMetabaseObject;

Shp: ISharedParams;

Params: IMetabaseObjectParams;

Pa: IMetabaseObjectParam;

Begin

MB := MetabaseClass.Active;

Mb.SpecialObject(MetabaseSpecialObject.SharedParams) := Null;

 

//creation of the global variables area

CrInfo := Mb.CreateCreateInfo;

CrInfo.Id := "MyParam";

CrInfo.Name := "MyParam";

CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_SHAREDPARAMS;

CrInfo.Parent := MB.ItemById("OBJ19645");

CrInfo.Permanent := False;

Des := Mb.CreateObject(CrInfo);

 

Obj := Des.Edit;

Shp := Obj As ISharedParams;

Shp.IsShared := True;

Shp.Resource := MB.ItemById("Resource").Bind As IResourceObject;

Shp.NameResource := "SHARA";

Params := Shp.Params;

//parameter creation

Pa := Params.Add;

Pa.Id := "GLOBAL_INT";

Pa.DataType := DbDataType.Integer;

Pa.DefaultValue := 15;

Obj.Save;

End Sub main;

The global variable is created after executing this example and its name depends on the repository (scheme) language set. The string resource should have the SHARA_GLOBAL_INT identifier in the resource editor (the Resource identifier).

See also:

ISharedParams