document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. class MaxIntText(wt.CTextValidator):
  2.     def __init__(self, parent, aMaxInt, *args, **kwargs):
  3.         self.mMaxInt = aMaxInt
  4.         wt.CTextValidator.__init__(self, parent, *args, **kwargs)
  5.        
  6.     def onChange(self, event):
  7.         tValue = self.GetValue()
  8.         if tValue.isdigit():
  9.             if int(tValue) > self.mMaxInt:
  10.                 self.dontAllow()
  11.         elif tValue != \'\':
  12.             self.dontAllow()
');