X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4b73b1b8e585418459362c9bf9173aa21da8c41..11f0bb6988110777c5ed8ef944cbdd8f8684d786:/wxPython/wx/lib/maskededit.py diff --git a/wxPython/wx/lib/maskededit.py b/wxPython/wx/lib/maskededit.py index 3b1630e153..39d3a17d10 100644 --- a/wxPython/wx/lib/maskededit.py +++ b/wxPython/wx/lib/maskededit.py @@ -4444,7 +4444,8 @@ class MaskedEditMixin: dbg('text: "%s"' % text) if self._signOk: signpos = self._decimalpos - (len(text[:self._decimalpos].lstrip()) + 1) - if text[signpos+1] in ('-','('): + # prevent checking for empty string - Tomo - Wed 14 Jan 2004 03:19:09 PM CET + if len(text) >= signpos+1 and text[signpos+1] in ('-','('): signpos += 1 else: signpos = -1 @@ -5993,7 +5994,7 @@ class MaskedTextCtrl( wx.TextCtrl, MaskedEditMixin ): ## events, we have to do it ourselves when we auto-complete. class MaskedComboBoxSelectEvent(wx.PyCommandEvent): def __init__(self, id, selection = 0, object=None): - wx.PyCommandEvent.__init__(self, wx.EVT_COMMAND_COMBOBOX_SELECTED, id) + wx.PyCommandEvent.__init__(self, wx.wxEVT_COMMAND_COMBOBOX_SELECTED, id) self.__selection = selection self.SetEventObject(object)