Whenever location changes, dispatch an action to get it in the store
432275
function handleLocationChange(location) {
    // ... unless we just caused that location change
    if (isTimeTraveling) {
      return;
    }

    // Remember where we are
    currentLocation = location;

    // Are we being called for the first time?
    if (!initialLocation) {
      // Remember as a fallback in case state is reset
      initialLocation = location;

      // Respect persisted location, if any
      if (getLocationInStore()) {
        return;
      }
    }

    // Tell the store to update by dispatching an action
    store.dispatch({
      type: _reducer.LOCATION_CHANGE,
      payload: location
    });
  }
501404
function onsuccess(event) {
            // remember the db instance
            self.db = event.target.result;

            // storage is now possible
            self.store = true;

            // execute all pending operations
            while (self.waiting.length) {
                self.waiting.shift().call(self);
            }

            // we're done, fire the callback
            if (cb) {
                cb.call(self, self);
            }
        }
1191746
function() {
    const changed_keys = store._changed_keys
    if (changed_keys.length === 0) {
      console.error('no keys were changed, yet we are trying to publish a store change')
      return
    }

    // make sure _changed_keys is reset before executing callbacks
    // (if callbacks modify state, the list of keys the callback changed would be wiped out)
    store._changed_keys = []
    store._clearDebounceTimeout()
    store._callback_objs.forEach(obj => obj.callback(changed_keys))
  }
140493
function (callback, id) {
        if (id === undefined && storeObjectId) {
          id = storeObjectId
        }
        getById(callback, 'stores', id)
      }
52396
function dispatch(context, event, args) {
    var date = new Date()
    for (var i = 0; i < listeners.length; i++)
      listeners[i](context, event, date, args)
  }
623582
function replace(id, item, store) {
      var data = store.rootData.asObject();
      // Check id coincidence
      if (data[id.toString()]) {
        // Add item id property if it hasn't
        item[store.idProperty] = id.toString();
        // Replace item
        data[id.toString()] = item;
        // Update store data
        store.rootData = store.data = new Result(data,store, store.data.__sorted);
        // Update store data items length
        store.size = Object.keys(store.data).length;
        // Trigger onSourceChanged event
        vcomet.triggerCallback("onSourceChanged", store);
      } else {
        // Item not found warning
        return vcomet.error.log("store", "Item with id " + id + " not found");
      }
      return item;
    }
456200
def on_select(self, item, action):
        

        if not isinstance(item, int):
            item = self.items.index(item)

        self._on_select[item] = action
357949
protected function actionListStore()
    {
        list($selected, $action, $value) = $this->getPostedAction();

        $updated = $deleted = 0;

        foreach ($selected as $id) {

            if ($action === 'status' && $this->access('store_edit')) {
                $updated += (int) $this->store->update($id, array('status' => (int) $value));
            }

            if ($action === 'delete' && $this->access('store_delete') && !$this->store->isDefault($id)) {
                $deleted += (int) $this->store->delete($id);
            }
        }

        if ($updated > 0) {
            $message = $this->text('Updated %num item(s)', array('%num' => $updated));
            $this->setMessage($message, 'success');
        }

        if ($deleted > 0) {
            $message = $this->text('Deleted %num item(s)', array('%num' => $deleted));
            $this->setMessage($message, 'success');
        }
    }
424427
function (payload) {
        var pendingList = pendings[payload.type];
        if (pendingList) {
            pendingList.push(payload);
        }
        else {
            payload.dispatchAction = dispatchAction;
            api.dispatchAction(payload);
        }
    }
455839
function dispatch(req, done) {
      var site = req.site
        , path = upath.join(site.path || '', req.path)
        , parent = site.parent;
      while (parent) {
        path = upath.join(parent.path || '', path);
        parent = parent.parent;
      }
      
      console.log('# ' + path);
      
      var page = new Page(path, req.context);
      pages.push(page);
      
      page.once('close', done);
      //page.site = self;
      //page.pages = pages;
      self.handle(page);
    }
569277
function handleStatusChange(response) {
  if (response.authResponse) {
    logResponse(response);
    window.location.hash = '#menu';
    updateUserInfo(response);
  } else {
    window.location.hash = '#login';
  }
}
443260
function getRangeRemote(start, limit, store) {
      // Request for data calling listRemote function
      store.listRemote(function() {
        // Get store data by range
        StoreMemory.getRange(start, limit, null, store);
        // Trigger user callback once data has been retrieved
        vcomet.triggerCallback("onGetRangeRemote", store);
      });
    }
1033830
def dispatch(self):
    """"""
    try:
      webapp2.RequestHandler.dispatch(self)
    finally:
      self.session_store.save_sessions(self.response)
1030802
function createLocation () {
  var deferred = q.defer();

  // Make the directory, and report status
  mkdirp(globalConfig.db.location, function (err, made) {
    if(err) return deferred.reject(err);

    deferred.resolve(made);
  });

  return deferred.promise;
}
1212791
def record_change(record, action)
      # skip unless something has actually changed
      return if action == :update && record.previous_changes.empty?
      # dispatch the record change to all known strategies
      @strategy_by_attribute.values.each { |strategy| strategy.record_change(record, action) }
    end
497032
private void handleInPlaceActions(File result) throws IOException {
    if (isInPlace()) {
      // we operate in-place
      FileUtils.forceDelete(src);
      if (result.isFile()) {
        FileUtils.moveFile(result, src);
      }
      else {
        FileUtils.moveDirectory(result, src);
      }
    }
  }
1113372
protected void doHandleChanged() {
		// If there is an associated action, execute it
		if (getActionOnChange() != null) {
			final ActionEvent event = new ActionEvent(this, getActionCommand(), getActionObject());
			final boolean isCAT = isCurrentAjaxTrigger();
			Runnable later = new Runnable() {
				@Override
				public void run() {
					getActionOnChange().execute(event);
					if (isCAT && UIContextHolder.getCurrent().getFocussed() == null) {
						setFocussed();
					}
				}
			};

			invokeLater(later);
		} else if (AjaxHelper.isCurrentAjaxTrigger(this) && UIContextHolder.getCurrent().getFocussed() == null) {
			setFocussed();
		}
	}