IDE: Remove all occurrences of deprecated wx.grid.PyGrid
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Mon, 15 Apr 2024 09:08:09 +0200
changeset 3931 1c0263e2b3b1
parent 3930 1cb8f90bf4fd
child 3932 62d04933d569
IDE: Remove all occurrences of deprecated wx.grid.PyGrid
bacnet/BacnetSlaveEditor.py
bacnet/bacnet.py
controls/CustomTable.py
fake_wx.py
--- a/bacnet/BacnetSlaveEditor.py	Fri Apr 05 14:59:00 2024 +0200
+++ b/bacnet/BacnetSlaveEditor.py	Mon Apr 15 09:08:09 2024 +0200
@@ -515,7 +515,7 @@
 
 
 class ObjectTable(CustomTable):
-    #  A custom wx.grid.PyGridTableBase using user supplied data
+    #  A custom wx.grid.GridTableBase using user supplied data
     #
     #  This will basically store a list of BACnet objects that the slave will support/implement.
     #  There will be one instance of this ObjectTable class for each BACnet object type
--- a/bacnet/bacnet.py	Fri Apr 05 14:59:00 2024 +0200
+++ b/bacnet/bacnet.py	Mon Apr 15 09:08:09 2024 +0200
@@ -153,12 +153,12 @@
     #
     #  Logic:
     #    - The xx_VarEditor classes inherit from wx.grid.Grid
-    #    - The xx_ObjTable  classes inherit from wx.grid.PyGridTableBase
+    #    - The xx_ObjTable  classes inherit from wx.grid.GridTableBase
     #  To be more precise, the inheritance tree is actually:
     #    xx_VarEditor -> ObjectGrid -> CustomGrid   -> wx.grid.Grid
-    #    xx_ObjTable  -> ObjectTable -> CustomTable -> wx.grid.PyGridTableBase)
-    #
-    #  Note that wx.grid.Grid is prepared to work with wx.grid.PyGridTableBase as the container of
+    #    xx_ObjTable  -> ObjectTable -> CustomTable -> wx.grid.GridTableBase)
+    #
+    #  Note that wx.grid.Grid is prepared to work with wx.grid.GridTableBase as the container of
     #  data that is displayed and edited in the Grid.
 
     ConfNodeMethods = [
@@ -409,7 +409,7 @@
         # contains more stuff we do not need to store. Actually it is a bad idea to store
         # this extra stuff (as we would make the files we generate dependent on the actual
         # version of the wx library we are using!!! Remember that ObjTables evetually
-        # derives/inherits from wx.grid.PyGridTableBase). Another reason not to store the whole
+        # derives/inherits from wx.grid.GridTableBase). Another reason not to store the whole
         # object is because it is not pickable (i.e. pickle.dump() cannot handle it)!!
         try:
             fd = open(filepath,   "w")
--- a/controls/CustomTable.py	Fri Apr 05 14:59:00 2024 +0200
+++ b/controls/CustomTable.py	Mon Apr 15 09:08:09 2024 +0200
@@ -33,7 +33,7 @@
     ROW_HEIGHT = 28
 
 
-class CustomTable(wx.grid.PyGridTableBase):
+class CustomTable(wx.grid.GridTableBase):
 
     """
     A custom wx.grid.Grid Table using user supplied data
--- a/fake_wx.py	Fri Apr 05 14:59:00 2024 +0200
+++ b/fake_wx.py	Mon Apr 15 09:08:09 2024 +0200
@@ -85,7 +85,7 @@
     ('wx.lib.buttons',['GenBitmapTextButton']),
     ('wx.adv',['EditableListBox']),
     ('wx.grid',[
-        'Grid', 'PyGridTableBase', 'GridCellEditor', 'GridCellTextEditor',
+        'Grid', 'GridTableBase', 'GridCellEditor', 'GridCellTextEditor',
         'GridCellChoiceEditor']),
     ('wx.lib.agw.customtreectrl',['CustomTreeCtrl']),
     ('wx.lib.gizmos',[]),