The answer is that you get the value from the cell, where it should be set by your editor. From the demo:
def ApplyEdit(self, row, col, grid):
"""
This function should save the value of the control into the
grid or grid table. It is called only after EndEdit() returns
a non-None value.
*Must Override*
"""
self.log.write("MyCellEditor: ApplyEdit (%d,%d)\n" % (row, col))
val = self._tc.GetValue()
grid.GetTable().SetValue(row, col, val) # update the table
self.startValue = ''
self._tc.SetValue('')
The reason that you get a crash is that once the editor doesn’t have a value once the edit is done as the control is not the editor but rather the editor’s choice control, (a text control called tc in the demo).
Hope that helps.
Gadget Steve
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
wxpython-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/wxpython-users/063e9f73-554f-4455-b4ef-9bd0839269fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.