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

Device.RemoveListener()

to remove the device listener

Syntax

Device.AddListener(event, function, [pointer]);

input sample description
function function(data) {} type: function
the unnamed function or reference to the function
pointer - type: object
the pointer to the object which serves the function (optional)
output
data type: string
the received data in the byte format


Example:

function print() 
{  
    IR.Log(text);
}
Module.GetDevice("MyDevice").RemoveListener(IR.EVENT_RECEIVE_TEXT, print);

When using the device listener only driver events work