I use: import wx.grid as gridlib
and then I do this inside the class that inherits wx.Panel
:
self.grid = gridlib.Grid(self)
self.grid.CreateGrid(10000, 17)
And it creates a large grid. Now when I do this in a function that is being called by another thread:
current_line = 1
wx.CallAfter(self.grid.SetCellValue(current_line - 1, 1, "SMTH"))
current_line += 1
wx.CallAfter(self.grid.SetCellValue(current_line - 1, 1, "SMTH"))
On the second wx.CallAfter
I get:
assert callable(callableObj), "callableObj is not callable" AssertionError: callableObj is not callable
So it means the object loses its method? I mean functions in python are objects, so the SetCellValue
object is somehow deleted?