This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Remove grp.listener
#6
This won't work because each time you call actualizarEstados a new function is created.
If you don't have any other code modifying the listeners array you can simply remove the last listener that has been registered like this:
Code:
function removelistenerlast(addr) {
  var id = Scada.encodeGroupAddress(addr);
  var listeners = objectStore.listeners[ id ] || [];
  listeners.pop();
}
Reply


Messages In This Thread
Remove grp.listener - by DGrandes - 07.03.2023, 10:34
RE: Remove grp.listener - by admin - 07.03.2023, 10:57
RE: Remove grp.listener - by DGrandes - 07.03.2023, 11:38
RE: Remove grp.listener - by admin - 07.03.2023, 11:40
RE: Remove grp.listener - by DGrandes - 07.03.2023, 11:52
RE: Remove grp.listener - by admin - 07.03.2023, 12:03
RE: Remove grp.listener - by DGrandes - 07.03.2023, 12:10

Forum Jump: