Checks if the key name and value fields have been set, and updates the add key button
344240
def key_changed(self):
        """"""
        if self.key_name.get() and self.key_val.get():
            self.button_key_add.state(["!disabled"])
        else:
            self.button_key_add.state(["disabled"])
102138
function create_new_field_keys( &$field )
	{
		// update key
		$field['key'] = 'field_' . uniqid();
		
		
		if( isset($field['sub_fields']) && is_array($field['sub_fields']) )
		{
			foreach( $field['sub_fields'] as $f )
			{
				$this->create_new_field_keys( $f );
			}
		}
		elseif( isset($field['layouts']) && is_array($field['layouts']) )
		{
			foreach( $field['layouts'] as $layout )
			{
				if( isset($layout['sub_fields']) && is_array($layout['sub_fields']) )
				{
					foreach( $layout['sub_fields'] as $f )
					{
						$this->create_new_field_keys( $f );
					}
				}
				
			}
		}
	}
218437
def _nt_on_change(self, key, value, isNew):
        """"""
        self._send_update({"k": key, "v": value, "n": isNew})
32859
public void updateEvent(String key, String value) {
        updateEvent(key, value, true, true);
    }
1275185
def insert(self, key, value):
    """"""
    self._values.insert(key, self._type_checker.CheckValue(value))
    if not self._message_listener.dirty:
      self._message_listener.Modified()
514878
@Override
    public boolean updateValuesForField(String currentValue) {
        boolean bUpdated = false;
        FieldDefinition fieldDef = m_tableDef.getFieldDef(m_fieldName);
        if (fieldDef == null || !fieldDef.isCollection()) {
            bUpdated = updateSVScalar(currentValue);
        } else {
            bUpdated = updateMVScalar(currentValue);
        }
        return bUpdated;
    }
728542
def update_field(self, name, value):
        
        kwargs = {}
        kwargs['field.' + name] = value
        return self.post(**kwargs)
514123
def update_value(self, key, value):
        """"""

        if key == "Status":
            self._inhibited = value != "Enabled"
        elif key == "Color temperature":
            self._temperature = int(value.rstrip("K"), 10)
        elif key == "Period":
            self._period = value
        elif key == "Brightness":
            self._brightness = value
        elif key == "Location":
            location = []
            for x in value.split(", "):
                v, d = x.split(" ")
                location.append(float(v) * (1 if d in "NE" else -1))
            self._location = (location)
520960
def handle_update(self, action, params):
    """"""
    _LOGGER.debug('Keypad: "%s" %s Action: %s Params: %s"' % (
                  self._keypad.name, self, action, params))
    ev_map = {
        Button._ACTION_PRESS: Button.Event.PRESSED,
        Button._ACTION_RELEASE: Button.Event.RELEASED
    }
    if action not in ev_map:
      _LOGGER.debug("Unknown action %d for button %d in keypad %d" % (
          action, self.number, self.keypad.name))
      return False
    self._dispatch_event(ev_map[action], {})
    return True
1247459
private void onKeyUpdated(final int index, final Map.Entry<String, String> object, final String value) {
        final HashMap<String, String> _m = new LinkedHashMap<String, String>(getValue());
        final String lastKeyValue = object.getKey();
        String mapValue = "";
        if (lastKeyValue != null) {
            mapValue = _m.remove(lastKeyValue);
        }
        _m.put(value, mapValue);
        setValue(_m, true);
    }
1201878
function( key, info, callback ){
    this._run("update " + this.infoTable + " set info = '" + JSON.stringify(info) + "' where id = '"+key+":info'", function(err){
      if ( err ){
        callback('Key Not Found ' + key, null);
      } else {
        callback(null, true);
      }
    });
  }
1114199
public function refresh()
    {
        $keyName = $this->keyName;

        //If we don't have a key we cant refresh
        if (! isset($this->$keyName))
        {
            return;
        }

        $dbItem = self::getOneByKey($this->getKey());

        //Check if we are already the same
        if ($dbItem == $this)
        {
            return;
        }

        //Get values from DB & check if they match. Update if needed
        foreach (get_object_vars($dbItem) as $var => $val)
        {
            if ($this->$var !== $val)
            {
                $this->$var = $val;
            }
        }
    }
927278
function() {
			var todos = todosDB.getList();

			var completedCount = 0;
			for (var i = 0, len = todos.length; i < len; i++) {
				if (todos[i].completed) {
					completedCount++;
				}
			}

			var itemsLeft = todos.length - completedCount;

			this.updateItemsLeft(itemsLeft);
			this.updateCompletedButton(completedCount);

		}
191822
def _update_property_keys(cls):
        """"""
        for attr_name, config_prop in cls._iter_config_props():
            if config_prop.property_key is None:
                config_prop.property_key = attr_name
726698
function () {
                var newValue = this._cfg.keyValue;
                this._cfg.value = newValue;
                this.setProperty("value", newValue);
                // setProperty on value might destroy the widget
                if (this._cfg) {
                    this._setState();
                    this._updateDomForState();
                    if (this._cfg.onchange) {
                        this.evalCallback(this._cfg.onchange);
                    }
                }
            }
93221
private void initAddKeyInput() {

        //the input field for the key
        m_addKeyInput = new TextField();
        m_addKeyInput.setWidth("100%");
        m_addKeyInput.setInputPrompt(m_messages.key(Messages.GUI_INPUT_PROMPT_ADD_KEY_0));
        final ShortcutListener shortCutListener = new ShortcutListener("Add key via ENTER", KeyCode.ENTER, null) {

            private static final long serialVersionUID = 1L;

            @Override
            public void handleAction(Object sender, Object target) {

                handleAddKey();

            }

        };
        m_addKeyInput.addFocusListener(new FocusListener() {

            private static final long serialVersionUID = 1L;

            public void focus(FocusEvent event) {

                m_addKeyInput.addShortcutListener(shortCutListener);

            }
        });
        m_addKeyInput.addBlurListener(new BlurListener() {

            private static final long serialVersionUID = 1L;

            public void blur(BlurEvent event) {

                m_addKeyInput.removeShortcutListener(shortCutListener);

            }
        });

    }
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)