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.

Localbus unlisten
#3
(29.10.2021, 10:19)admin Wrote: Try this:
Code:
localbus.unlistenobject = function(addr, callback) {
  var id = localbus.encodega(addr);
 
  if (id) {
    var callbacks = localbus.listeners.object[ id ];
   
    if (callbacks) {
      var index = callbacks.indexOf(callback);

      if (index >= 0) {
        cbs.splice(index, 1);
      }
    }
  }
};

Yes! Perfect. Thanks.

Is there also a way to wait for the localbus initialization process to finish? It does not return a promise or such so now we do not know when all object states are received and socket is connected...

Thanks again!
Reply


Messages In This Thread
Localbus unlisten - by Smeagol - 29.10.2021, 05:44
RE: Localbus unlisten - by admin - 29.10.2021, 10:19
RE: Localbus unlisten - by Smeagol - 30.10.2021, 13:15
RE: Localbus unlisten - by admin - 01.11.2021, 07:39

Forum Jump: