Error in wx.TextCtrl Constructor with Validator

The line for the text entry widget is:

     self.sampID = wx.TextCtrl(self, wx.ID_ANY, size=wx.Size(200, 25),
                           style=wx.TAB_TRAVERSAL|wx.TE_PROCESS_ENTER|
                           wx.RAISED_BORDER, validator=NotBlankValidator())

and the python error is:

   File
"/home/rshepard/projects/biotaPage.py",
line 78, in __init__
     wx.RAISED_BORDER, validator=NotBlankValidator())
TypeError: __init__() takes exactly 3 arguments (1 given)

   There is no error if the validator function call is excluded. Is this
caused by a formatting error since the constructor extends over 3 lines?
I've not applied validators before so I need to learn what I've done
incorrectly.

Rich

The error is probably from not passing required args to NotBlankValidator(), check the signature of its __init__

···

On 12/9/11 2:20 PM, Rich Shepard wrote:

The line for the text entry widget is:

self.sampID = wx.TextCtrl(self, wx.ID_ANY, size=wx.Size(200, 25),
style=wx.TAB_TRAVERSAL|wx.TE_PROCESS_ENTER|
wx.RAISED_BORDER, validator=NotBlankValidator())

and the python error is:

File
"/home/rshepard/projects/biotaPage.py",
line 78, in __init__
wx.RAISED_BORDER, validator=NotBlankValidator())
TypeError: __init__() takes exactly 3 arguments (1 given)

There is no error if the validator function call is excluded. Is this
caused by a formatting error since the constructor extends over 3 lines?
I've not applied validators before so I need to learn what I've done
incorrectly.

--
Robin Dunn
Software Craftsman

Oops! Thank you.

Rich

···

On Fri, 9 Dec 2011, Robin Dunn wrote:

The error is probably from not passing required args to
NotBlankValidator(), check the signature of its __init__