]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/maskededit.py
Docstring tweaks
[wxWidgets.git] / wxPython / wx / lib / maskededit.py
index 3b1630e153609a3870240e444f5253d1eb00e5e0..39d3a17d10a940245c696bd79a3ce4f5cf83162a 100644 (file)
@@ -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)