How to use the @lumino/signaling.Signal.clearData function in @lumino/signaling

To help you get started, we’ve selected a few @lumino/signaling examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / packages / documentsearch / src / searchinstance.ts View on Github external
dispose() {
    if (this.isDisposed) {
      return;
    }
    this._isDisposed = true;

    // If a query hasn't been executed yet, no need to call endSearch
    if (this._displayState.query) {
      void this._activeProvider.endSearch();
    }

    this._searchWidget.dispose();
    this._disposed.emit(undefined);
    Signal.clearData(this);
  }
github jupyterlab / lumino / packages / widgets / src / focustracker.ts View on Github external
dispose(): void {
    // Do nothing if the tracker is already disposed.
    if (this._counter < 0) {
      return;
    }

    // Mark the tracker as disposed.
    this._counter = -1;

    // Clear the connections for the tracker.
    Signal.clearData(this);

    // Remove all event listeners.
    each(this._widgets, w => {
      w.node.removeEventListener('focus', this, true);
      w.node.removeEventListener('blur', this, true);
    });

    // Clear the internal data structures.
    this._activeWidget = null;
    this._currentWidget = null;
    this._nodes.clear();
    this._numbers.clear();
    this._widgets.length = 0;
  }
github jupyterlab / jupyterlab / packages / docmanager / src / manager.ts View on Github external
dispose(): void {
    if (this.isDisposed) {
      return;
    }
    this._isDisposed = true;

    // Clear any listeners for our signals.
    Signal.clearData(this);

    // Close all the widgets for our contexts and dispose the widget manager.
    this._contexts.forEach(context => {
      return this._widgetManager.closeWidgets(context);
    });
    this._widgetManager.dispose();

    // Clear the context list.
    this._contexts.length = 0;
  }
github jupyterlab / lumino / packages / polling / src / poll.ts View on Github external
dispose(): void {
    if (this.isDisposed) {
      return;
    }

    this._state = {
      ...Private.DISPOSED_STATE,
      timestamp: new Date().getTime()
    };
    this._tick.promise.catch(_ => undefined);
    this._tick.reject(new Error(`Poll (${this.name}) is disposed.`));
    this._disposed.emit(undefined);
    Signal.clearData(this);
  }
github jupyterlab / jupyterlab / packages / services / src / basemanager.ts View on Github external
dispose(): void {
    if (this.isDisposed) {
      return;
    }
    this._disposed.emit(undefined);
    Signal.clearData(this);
  }
github jupyterlab / jupyterlab / packages / services / src / session / default.ts View on Github external
dispose(): void {
    if (this.isDisposed) {
      return;
    }
    this._isDisposed = true;
    this._kernel.dispose();
    this._statusChanged.emit('dead');
    this._terminated.emit(void 0);
    Private.removeRunning(this);
    Signal.clearData(this);
  }
github jupyterlab / jupyterlab / packages / coreutils / src / poll.ts View on Github external
dispose(): void {
    if (this.isDisposed) {
      return;
    }

    this._state = {
      ...Private.DISPOSED_STATE,
      timestamp: new Date().getTime()
    };
    this._tick.promise.catch(_ => undefined);
    this._tick.reject(new Error(`Poll (${this.name}) is disposed.`));
    this._disposed.emit();
    Signal.clearData(this);
  }
github jupyterlab / jupyterlab / packages / logconsole / src / registry.ts View on Github external
dispose() {
    if (this.isDisposed) {
      return;
    }
    this._isDisposed = true;
    this._loggers.forEach(x => x.dispose());
    Signal.clearData(this);
  }
github jupyterlab / jupyterlab / packages / observables / src / observablelist.ts View on Github external
dispose(): void {
    if (this._isDisposed) {
      return;
    }
    this._isDisposed = true;
    Signal.clearData(this);
    this.clear();
  }
github jupyterlab / jupyterlab / packages / observables / src / modeldb.ts View on Github external
dispose(): void {
    if (this._isDisposed) {
      return;
    }
    this._isDisposed = true;
    Signal.clearData(this);
    this._value = null;
  }

@lumino/signaling

Lumino Signals and Slots

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

83 / 100
Full package analysis

Similar packages