

def update_editor(self):
    ' Updates the editor when the object trait changes externally to the\n            editor.\n        '
    user_value = self._get_user_value()
    try:
        unequal = bool((user_value != self.value))
    except ValueError:
        unequal = True
    if unequal:
        self._no_update = True
        self.control.SetValue(self.str_value)
        self._no_update = False
    if (self._error is not None):
        self._error = None
        self.ui.errors -= 1
        self.set_error_state(False)

dataset/ETHPy150Open enthought/traitsui/traitsui/wx/text_editor.py SimpleEditor.update_editor/original