code: def _fromGUI(self, value):
          
  
          # One or more of the underlying text control implementations
          # issue an intermediate EVT_TEXT when replacing the control's
          # value, where the intermediate value is an empty string.
          # So, to ensure consistency and to prevent spurious ValueErrors,
          # we make the following test, and react accordingly:
          #
          if value == '':
              if not self.IsNoneAllowed():
                  return 0
              else:
                  return
          else:
              try:
                  return int(value)
              except ValueError:
                  if self.IsLongAllowed():
                      try:
                          return long(value)
                      except ValueError:
                          wx.TextCtrl.SetValue(self, "0")
                          return 0
                  else:
                      raise
docs: Conversion function used in getting the value of the control.