193 |
self.RegisterDataType(wxGRID_VALUE_FLOAT, |
self.RegisterDataType(wxGRID_VALUE_FLOAT, |
194 |
NullRenderer(wxGridCellFloatRenderer()), None) |
NullRenderer(wxGridCellFloatRenderer()), None) |
195 |
|
|
196 |
|
EVT_WINDOW_DESTROY(self, self.OnDestroy) |
197 |
|
|
198 |
|
def OnDestroy(self, event): |
199 |
|
Publisher.Destroy(self) |
200 |
|
|
201 |
def SetTableObject(self, table): |
def SetTableObject(self, table): |
202 |
self.table.SetTable(table) |
self.table.SetTable(table) |
203 |
|
|
591 |
|
|
592 |
def OnDestroy(self, event): |
def OnDestroy(self, event): |
593 |
"""Extend inherited method to unsubscribe messages""" |
"""Extend inherited method to unsubscribe messages""" |
594 |
|
# There's no need to unsubscribe from self.grid's messages |
595 |
|
# because it will get a DESTROY event too (since destroying the |
596 |
|
# frame basically means that all child windows are also |
597 |
|
# destroyed) and this it will clear all subscriptions |
598 |
|
# automatically. It may even have been destroyed already (this |
599 |
|
# does happen on w2000 for instance) so calling any of its |
600 |
|
# methods here would be an error. |
601 |
self.parent.Unsubscribe(SHAPES_SELECTED, self.select_shapes) |
self.parent.Unsubscribe(SHAPES_SELECTED, self.select_shapes) |
|
self.grid.Unsubscribe(ROW_SELECTED, self.rows_selected) |
|
602 |
self.map.Unsubscribe(MAP_LAYERS_REMOVED, self.map_layers_removed) |
self.map.Unsubscribe(MAP_LAYERS_REMOVED, self.map_layers_removed) |
603 |
QueryTableFrame.OnDestroy(self, event) |
QueryTableFrame.OnDestroy(self, event) |
604 |
|
|