def _write_widget(self, val):
        """Writes value into the widget. If specified, user setter
        is invoked."""
        self._itsme = True
        try:
            setter = self._wid_info[self._wid][1]
            wtype = self._wid_info[self._wid][2]
            if setter:
                if wtype is not None:
                    setter(self._wid, self._cast_value(val, wtype))
                else:
                    setter(self._wid, val)
        finally:
            self._itsme = False