## updateOnChange A helper to trigger an event when a value changes
173171
function(compute, newValue, oldValue, batchNum){

	var valueChanged = newValue !== oldValue && !(newValue !== newValue && oldValue !== oldValue);
	// Only trigger event when value has changed
	if (valueChanged) {
		compute.dispatch({type: "change", batchNum: batchNum}, [
			newValue,
			oldValue
		]);
	}
}
213907
@UiHandler("m_textbox")
    void onTextBoxChange(ValueChangeEvent<String> event) {

        fireChange(false);
        if (m_infoTimer != null) {
            m_infoTimer.cancel();
            m_infoTimer = null;
        }
        m_infoTimer = new Timer() {

            @Override
            public void run() {

                updateResourceInfo(getFormValueAsString());
                clearInfoTimer();
            }
        };
        m_infoTimer.schedule(300);
    }
414022
function (name, value, oldValue) {
                this.$InputElement.onbind.apply(this, arguments);
                if (name === "checked") {
                    this._domElt.checked = value;
                }
            }
780574
def on_event_pre(self, e: Event) -> None:
        """"""
        super().on_event_pre(e)
        ct_msg = e.init.get('currentTarget', dict())
        if e.type in ('input', 'change'):
            # Update user inputs
            self._set_text_content(ct_msg.get('value') or '')
1364008
function(el,prop,val,ret,args,stopChange)
            {
              var e = new _changeEvent(el,prop,val,ret,args,undefined,'set',stopChange);

              if(el.__kb !== undefined)
              {
                var localAttrListeners = el.__kb._attrListeners,
                    localStyleListeners = el.__kb._styleListeners,
                    localParentAttrListeners = el.__kb._parentAttrListeners,
                    localParentStyleListeners = el.__kb._parentStyleListeners;

                if(localAttrListeners[prop] !== undefined)
                {
                  loopListener(localAttrListeners[prop],e);
                }

                if(e._stopPropogation === undefined && localStyleListeners[prop] !== undefined)
                {
                  loopListener(localStyleListeners[prop],e);
                }
                
                if(e._stopPropogation === undefined && localAttrListeners[_all] !== undefined)
                {
                  loopListener(localAttrListeners[_all],e);
                  if(e._stopPropogation === undefined)
                  {
                    loopListener(localStyleListeners[_all],e);
                  }
                }

                if(e._stopPropogation === undefined && localParentAttrListeners[prop] !== undefined)
                {
                  loopParentListener(localParentAttrListeners[prop],e);
                }

                if(e._stopPropogation === undefined && localParentStyleListeners[prop] !== undefined)
                {
                  loopParentListener(localParentStyleListeners[prop],e);
                }
                
                if(e._stopPropogation === undefined && localParentAttrListeners[_all] !== undefined)
                {
                  loopParentListener(localParentAttrListeners[_all],e);

                  if(e._stopPropogation === undefined)
                  {
                    loopParentListener(localParentStyleListeners[_all],e);
                  }
                }
              }

              if(e._stopPropogation === undefined && _attrListeners[prop] !== undefined)
              {
                loopListener(_attrListeners[prop],e);
              }

              if(e._stopPropogation === undefined && _styleListeners[prop] !== undefined)
              {
                loopListener(_styleListeners[prop],e);
              }
              
              if(e._stopPropogation === undefined && _attrListeners[_all] !== undefined)
              {
                loopListener(_attrListeners[_all],e);
                if(e._stopPropogation === undefined)
                {
                  loopListener(_styleListeners[_all],e);
                }
              }

              if(e._preventDefault !== undefined) return false;

              return true;
            }
1104234
private void onChange(String key, byte[] oldValue, byte[] newValue) {
    listeners.forEach(id -> getSession(id).accept(client -> client.onChange(key, oldValue, newValue)));
  }
248436
def _notify_change(self, model, attr, old, new, hint=None, setter=None, callback_invoker=None):
        ''' 

        '''
        # if name changes, update by-name index
        if attr == 'name':
            if old is not None:
                self._all_models_by_name.remove_value(old, model)
            if new is not None:
                self._all_models_by_name.add_value(new, model)

        if hint is None:
            serializable_new = model.lookup(attr).serializable_value(model)
        else:
            serializable_new = None

        event = ModelChangedEvent(self, model, attr, old, new, serializable_new, hint, setter, callback_invoker)
        self._trigger_on_change(event)
923136
@UiHandler("m_seriesCheckBox")
    void onSeriesChange(ValueChangeEvent<Boolean> event) {

        if (handleChange()) {
            m_controller.setIsSeries(event.getValue());
        }
    }
689091
def on_change(self, value):
        ''''''
        self._modifier(self.inst, self.prop, value)
1064313
function(value, sendUpdatedEvt) {
	   this.el.value = value;
		
		if(this.oButton) {
			this.oButton.set("value", value);
			var el = Dom.get(this.labelElId);
			if(el) {
				Dom.setStyle(el, "backgroundColor", value);
				el.innerHTML = "Current color is " + value;
			}
			else {
				Event.onAvailable(this.labelElId, function() {
					Dom.setStyle(this, "backgroundColor", value);
					this.innerHTML = "Current color is " + value;
				});
			}
		}
	
		if(this.oColorPicker) {
			this.oColorPicker.set("hex", value.substr(1));
		}

		// Call Field.setValue to set class and fire updated event
		inputEx.ColorPickerField.superclass.setValue.call(this,value, sendUpdatedEvt);
	}
61524
void onChange(String value) {

        boolean changed = !m_codeValue.equals(value);
        m_codeValue = value;
        if (changed) {
            fireEvent(new ValueChangeEvent(this));
        }
    }
857397
function (el, attrName, val) {
			var usingMutationObserver = isOfGlobalDocument(el) && getMutationObserver();
			attrName = attrName.toLowerCase();
			var oldValue;
			// In order to later trigger an event we need to compare the new value to the old value,
			// so here we go ahead and retrieve the old value for browsers that don't have native MutationObservers.
			if (!usingMutationObserver) {
				oldValue = attr.get(el, attrName);
			}

			var newValue;
			var special = attr.special[attrName];
			var setter = special && special.set;
			var test = getSpecialTest(special);

			// First check if this is a special attribute with a setter.
			// Then run the special's test function to make sure we should
			// call its setter, and if so use the setter.
			// Otherwise fallback to setAttribute.
			if(typeof setter === "function" && test.call(el)) {
				// To distinguish calls with explicit undefined, e.g.:
				// - `attr.set(el, "checked")`
				// - `attr.set(el, "checked", undefined)`
				if (arguments.length === 2){
					newValue = setter.call(el);
				} else {
					newValue = setter.call(el, val);
				}
			} else {
				attr.setAttribute(el, attrName, val);
			}

			if (!usingMutationObserver && newValue !== oldValue) {
				attr.trigger(el, attrName, oldValue);
			}
		}
981887
def update_event(self, hint, obj):
        """"""

        tree = self.treeview
        data = obj
        item = self.get_item_by_data(obj)
        if item:
            if data.get_id() != tree.item(item, 'text'):
                tree.item(item, text=data.get_id())
            # if tree.parent(item) != '' and 'layout' in data:
            if tree.parent(item) != '':
                row = data.get_layout_property('row')
                col = data.get_layout_property('column')
                values = tree.item(item, 'values')
                if (row != values[1] or col != values[2]):
                    values = (data.get_class(), row, col)
                tree.item(item, values=values)
            self.draw_widget(item)
            self.app.set_changed()
1360481
function _changeEvent(el,attr,value,oldValue,args,action,type,stopChange)
        {
          this.stopPropagation = function(){this._stopPropogation = true;};
          this.preventDefault = function(){this._preventDefault = true;};
          this.value = value;
          this.oldValue = oldValue;
          this.target = el;
          this.attr = attr;
          this.arguments = args;
          this.action = action;
          this.child = undefined;
          this.type = type;
          this.stopChange = stopChange;
        }
898428
function onUpdate (update) {
      var value = update[0], ts = update[1], id = update[2]
      insertBatch (id, key, ts, JSON.stringify(value), scuttlebutt)
    }
1191472
function(compute, newValue, oldValue, batchNum) {
            // Only trigger event when value has changed
            if (newValue !== oldValue) {
                can.batch.trigger(compute, batchNum ? {
                        type: "change",
                        batchNum: batchNum
                    } : 'change', [
                        newValue,
                        oldValue
                    ]);
            }
        }
845892
def on_change(self, attr, *callbacks):
        ''' 

        '''
        if len(callbacks) == 0:
            raise ValueError("on_change takes an attribute name and one or more callbacks, got only one parameter")

        _callbacks = self._callbacks.setdefault(attr, [])
        for callback in callbacks:

            if callback in _callbacks:
                continue

            _check_callback(callback, ('attr', 'old', 'new'))

            _callbacks.append(callback)