DimSrv Constructor

Syntax

PP.Mb.DimSrv(settings);

Parameters

settings. JSON object that contains values of class properties.

Description

The DimSrv constructor creates an instance of the DimSrv class.

Example

To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). The repository must contain a dictionary with the 106 key. Create a service to work with dictionaries.

// Create a service to work with dictionaries
var dimService = new PP.Mb.DimSrv({
    Metabase: metabase
});
// Add a handler of the event that occurs on opening a dictionary
dimService.DimOpened.add(
    function(sender, args) {
        // Output a list of event parameters to the console
        console.log("A list of arguments of the DimOpened event");
        for (var key in args) {
            console.log("Argument " + key + ", type " + args[key].getTypeName());
        }
    }
);
// Open the dictionary
var dim = dimService.open(106, true, true, null);

After executing the example a service for working with dictionaries is created, it is used to open the dictionary with the 106 key. After opening the dictionary the corresponding event occurred, after processing the event the browser console displays the following messages:

A list of arguments of the DimOpened event

The Dim argument, the DimSource source

The Source argument, the DimSource type

See also:

DimSrv