Материал из Module developer
Перейти к: навигация, поиск

Every script file must start with a listener

module.AddListener(IR.EVENT_MODULE_START, 0, function(){});

It's a new type of events, intended for developing modules. When developing a module it's important to remember that a script file becomes closed for other script files. It means that variables and names with the same names can be used in different script files and they are not rewritten. But here a limitation appears - you can get access to a function from another file easily. To get access to a function from another script file, import the script file with the help of module.Import("FileName.js") command.