Could some kind guru tell me what's wrong with this bit of code please.
The first call to SetStringItem is triggering an assertion failure
"invalid column index in SetItem".
Python 2.4.1, wxPython 2.6.1. Slackware Linux 10.2
i = 0
self.pVAT.vRateInfo.ClearAll()
self.pVAT.vRateInfo.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT,
heading=u'VAT Rate Name', width=-1)
self.pVAT.vRateInfo.InsertColumn(col=1, format=wx.LIST_FORMAT_LEFT,
heading=u'VAT Rate value', width=-1)
self.pVAT.vRateInfo.InsertColumn(col=2, format=wx.LIST_FORMAT_LEFT,
heading=u'VAT Rate Date', width=-1)
c= RunPar.dbConn.cursor()
c.execute("SELECT b.idVAT_rates, b.IdVAT_rate_types, a.Rate_Name, b.Rate, b.Date_applicable FROM VAT_rate_values b, VAT_rate_types a WHERE a.iDVAT_rate_types = b.idVAT_rate_types")
VAT_rates = c.fetchall()
for rate in VAT_rates:
self.pVAT.vRateInfo.InsertStringItem(i,rate[2])
self.pVAT.vRateInfo.SetStringItem(i,col=1,label=str(rate[3]))
self.pVAT.vRateInfo.SetStringItem(i,col=2,label=str(rate[4]))
i = i + 1