'foregroundColour', 'signedForegroundColour'):
if ctrl_kwargs.has_key(key):
if type(ctrl_kwargs[key]) in (types.StringType, types.UnicodeType):
- c = wxNamedColor(ctrl_kwargs[key])
+ c = wxNamedColour(ctrl_kwargs[key])
if c.Get() == (-1, -1, -1):
raise TypeError('%s not a legal color specification for %s' % (repr(ctrl_kwargs[key]), key))
else:
# if no fillchar change, but old value == old template, replace it:
if newvalue == old_template:
newvalue = self._template
- reset_value = true
+ reset_value = True
else:
self._defaultValue = None
if newfield != field and newfield._selectOnFieldEntry:
dbg('queuing selection: (%d, %d)' % (newfield._extent[0], newfield._extent[1]))
wxCallAfter(self._SetSelection, newfield._extent[0], newfield._extent[1])
- keep_processing = false
+ keep_processing = False
elif keep_processing:
dbg('char not allowed')
def _OnCtrl_Z(self, event=None):
""" Handles ctrl-Z keypress in control and Undo operation on context menu.
- Should return false to skip other processing. """
+ Should return False to skip other processing. """
dbg("wxMaskedEditMixin::_OnCtrl_Z", indent=1)
self.Undo()
dbg(indent=0)
dbg('cursor before 1st field; cannot change to a previous field')
if not wxValidator_IsSilent():
wxBell()
- return false
+ return False
if event.ControlDown():
dbg('queuing select to beginning of field:', field_start, pos)
if self._isTemplateChar( pos ): ## if a template character, return empty
- dbg('%d is a template character; returning false' % pos, indent=0)
+ dbg('%d is a template character; returning False' % pos, indent=0)
return False
if self._isMaskChar( pos ):
dbg(indent=0)
return approved
else:
- dbg('%d is a !???! character; returning false', indent=0)
+ dbg('%d is a !???! character; returning False', indent=0)
return False
else:
text = candidate
- valid = True # assume true
+ valid = True # assume True
for i in [-1] + self._field_indices: # process global constraints first:
field = self._fields[i]
start, end = field._extent
self._isNeg = False # (clear current assumptions)
value = self._adjustInt(value)
elif self._isDate and not self.IsValid(value) and self._4digityear:
- value = self._adjustDate(value, fixcentury=true)
+ value = self._adjustDate(value, fixcentury=True)
except ValueError:
# If date, year might be 2 digits vs. 4; try adjusting it:
if self._isDate and self._4digityear:
dateparts = value.split(' ')
- dateparts[0] = self._adjustDate(dateparts[0], fixcentury=true)
+ dateparts[0] = self._adjustDate(dateparts[0], fixcentury=True)
value = string.join(dateparts, ' ')
dbg('adjusted value: "%s"' % value)
value = self._Paste(value, raise_on_invalid=True, just_return_value=True)
self._isNeg = False # (clear current assumptions)
value = self._adjustInt(value)
elif self._isDate and not self.IsValid(value) and self._4digityear:
- value = self._adjustDate(value, fixcentury=true)
+ value = self._adjustDate(value, fixcentury=True)
except ValueError:
# If date, year might be 2 digits vs. 4; try adjusting it:
if self._isDate and self._4digityear:
dateparts = value.split(' ')
- dateparts[0] = self._adjustDate(dateparts[0], fixcentury=true)
+ dateparts[0] = self._adjustDate(dateparts[0], fixcentury=True)
value = string.join(dateparts, ' ')
dbg('adjusted value: "%s"' % value)
value = self._Paste(value, raise_on_invalid=True, just_return_value=True)
dbg(indent=0)
raise ValueError('%s must be a string', str(value))
- bValid = True # assume true
+ bValid = True # assume True
parts = value.split('.')
if len(parts) != 4:
bValid = False