I'm using a grid table for the data in the embedded RDBMS and displaying
the cell values in the wx.grid.Grid. In class
dataTable(wx.grid.PyGridTableBase): I have the method GetValue(self, row,
col) overridden to use the extracted table values for display. The actual
function is:
def GetValue(self, row, col):
if self.appData.altData != None:
value = self.appData.altData
return value
It's written this way bacause there will not initially be data in the
table, and the first three columns need to be explicitly set; hence the
'else' clause in the if statement.
However, as soon as I click on the notebook tab holding the grid, it
attempts to load data into each cell, and throws errors because the list it
should use is still empty. If I don't comment out the entire function I get
errors. If it's commented out, each cell contains 'None'. I seem to be stuck
in an infinite loop here; I cannot leave GetValue() uncommented and not have
the grid try to display something in each cell as soon as it's visible.
Cannot find anything appropriate in chapter 14 of the book.
Rich
···
--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863