Calls openers callbacks
970500
def call_openers(self, client, clients_list):
        
        for func in self.openers:
            func(client, clients_list)
481920
def _run_callbacks(kind, *args) #:nodoc:
      options = args.last # Last callback arg MUST be a Hash

      send("_#{kind}").each do |callback, conditions|
        invalid = conditions.find do |key, value|
          value.is_a?(Array) ? !value.include?(options[key]) : (value != options[key])
        end

        callback.call(*args) unless invalid
      end
    end
108454
def on(self, name, callback, once=False):
        
        if name not in self.event_listeners:
            self.event_listeners[name] = []

        self.event_listeners[name].append((callback, once))
1195193
def callback(self, callback, *args, **kwds):
        
        return self << _CloseDummy(callback, args, kwds)
880967
function callHandler(callback, context, args) {
  switch (args.length) {
    case 0: return callback.call(context);
    case 1: return callback.call(context, args[0]);
    case 2: return callback.call(context, args[0], args[1]);
    case 3: return callback.call(context, args[0], args[1], args[2]);
    default: return callback.apply(context, args);
  }
}
126193
function (oThis) {
                if (!oThis.getOpener()) {
                    var sId = "";
                    if (oThis.oPopup) {
                        if (oThis.oPopup._oPosition.of instanceof sap.ui.core.Element) {
                            sId = oThis.oPopup._oPosition.of.getId();
                        } else {
                            if (oThis.oPopup._oPosition.of.length > 0) {
                                sId = oThis.oPopup._oPosition.of[0].id;
                            } else {
                                sId = oThis.oPopup._oPosition.of.id;
                            }
                        }
                    }

                    if (sId !== "") {
                        oThis.setAssociation("opener", sId, true);
                    } else {
                        Log.error("Neither an opener was set properly nor a corresponding one can be distinguished", "", "sap.ui.ux3.ToolPopup");
                    }
                }
            }
856212
def add_callback(self, fn, *args, **kwargs):
        """"""
        if _debug: IOCB._debug("add_callback(%d) %r %r %r", self.ioID, fn, args, kwargs)

        # store it
        self.ioCallback.append((fn, args, kwargs))

        # already complete?
        if self.ioComplete.isSet():
            self.trigger()
739457
def _on_click(self, *args):
        
        if callable(self._callback):
            self._callback(self.selection)
491061
def shot_open_callback(self, *args, **kwargs):
        
        tf = self.browser.get_current_selection(1)
        if not tf:
            return
        if not os.path.exists(tf.path):
            msg = 'The selected shot does not exist: %s' % tf.path
            log.error(msg)
            self.statusbar.showMessage(msg)
            return
        js = JukeboxSignals.get()
        js.before_open_shot.emit(tf)
        self.open_shot(tf)
        js.after_open_shot.emit(tf)
546012
def call_closers(self, client, clients_list):
        
        for func in self.closers:
            func(client, clients_list)
976564
def _invoke_callbacks(self):
        """"""
        self.task_end_time = time.time()
        self.task_cost_time = self.task_end_time - self.task_start_time
        with self._condition:
            for callback in self._done_callbacks:
                try:
                    result = callback(self)
                    if callback in self._user_callbacks:
                        self._callback_result = result
                except Exception as e:
                    Config.main_logger.error("exception calling callback for %s" % e)
            self._condition.notify_all()
1175506
def call(self, method, params, callback=None):
        """"""
        cur_id = self._next_id()
        if callback:
            self._callbacks[cur_id] = callback
        self.send({'msg': 'method', 'id': cur_id, 'method': method, 'params': params})
995139
def filter_callbacks(cls, client, event_data):
        """"""

        for event in cls.filter_events(client, event_data):
            for cb in event.callbacks:
                yield cb
330654
def opener(self):
        ""
        if self._opener is None:
            log.debug("Creating connection handler")
            opener = build_opener()
            if self._cookies:
                log.debug("Appending cookies")
            else:
                log.debug("No cookies to append")
            for cookie in self._cookies:
                cookie_str = cookie.name + '=' + cookie.value
                opener.addheaders.append(('Cookie', cookie_str))
            self._opener = opener
        else:
            log.debug("Reusing connection manager")
        return self._opener
1261395
def callback(*names)
      names.each do |name|
        self.class_eval do
          define_method name, ->(*args, &block) do
            @callbacks ||= {}
            if block
              @callbacks[name] = block
            elsif @callbacks[name]
              @callbacks[name].call(*args)
            end
          end
        end
      end
    end
1189167
function execCallbacks(object) {
        if (object.hasClass('active')) {
          if (typeof(options.onOpen) === "function") {
            options.onOpen.call(this, object.parent());
          }
        } else {
          if (typeof(options.onClose) === "function") {
            options.onClose.call(this, object.parent());
          }
        }
      }
1290843
def _call_callbacks(self):
        """"""
        for callback in self._callbacks:
            callback(self, self._changeset)
        self._changeset = {}