I am attempting to use grid and it's associated classes. I have
received an error about which I am totally at a loss. This is, of
course, cannibalized code from the grid demo. Thanks ahead for
any help. Below is the trace:
Traceback (innermost last):
File "D:\Python20\pythonDev\tableGrid.py", line 45, in ?
frame = TestFrame(None)
File "D:\Python20\pythonDev\tableGrid.py", line 36, in __init__
gridData = GridData(labels, types, data)
File "d:\python20\wxPython\grid.py", line 718, in __init__
self.this = apply(gridc.new_wxPyGridTableBase,_args,_kwargs)
TypeError: new_wxPyGridTableBase requires exactly 0 arguments; 3
given
···
==========================================================================
Here is where tableGrid is being tested:
class TestFrame(wxFrame):
def __init__(self, parent):
wxFrame.__init__(self, parent, -1, "Table Grid",
size=(640,480))
labels = ['One', 'Two']
types = [wxGRID_VALUE_STRING, wxGRID_VALUE_STRING]
data = [['string1', 'string2'], ['string3', 'string4']]
gridData = GridData(labels, types, data)
grid = TableGrid(self, gridData)
=========================================================================
And here is the init for GridData:
from wxPython.wx import *
from wxPython.grid import *
import string
#----------------------------------------------------
class GridData(wxPyGridTableBase):
def __init_(self,labels, types, data):
wxPyGridTableBase.__init__(self)
self.labels = labels
self.types = types
self.data = data