IDE: fix wxPython 3->4 API change leading to exception in type selection menu in CodeFileEditor wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 13 Sep 2022 10:11:25 +0200
branchwxPython4
changeset 3590 09dad7f00c36
parent 3589 a0b645a934c9
child 3591 50600b946ea7
IDE: fix wxPython 3->4 API change leading to exception in type selection menu in CodeFileEditor
editors/CodeFileEditor.py
--- a/editors/CodeFileEditor.py	Tue Sep 06 21:06:36 2022 +0200
+++ b/editors/CodeFileEditor.py	Tue Sep 13 10:11:25 2022 +0200
@@ -824,12 +824,12 @@
             type_menu = wx.Menu(title='')
             base_menu = wx.Menu(title='')
             for base_type in self.Controler.GetBaseTypes():
-                new_entry = base_menu.Append(help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL, text=base_type)
+                new_entry = base_menu.Append(wx.ID_ANY, base_type)
                 self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(base_type), new_entry)
             type_menu.AppendMenu(wx.ID_ANY, "Base Types", base_menu)
             datatype_menu = wx.Menu(title='')
             for datatype in self.Controler.GetDataTypes():
-                new_entry = datatype_menu.Append(help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL, text=datatype)
+                new_entry = datatype_menu.Append(wx.ID_ANY, item=datatype)
                 self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(datatype), new_entry)
             type_menu.AppendMenu(wx.ID_ANY, "User Data Types", datatype_menu)
             rect = self.VariablesGrid.BlockToDeviceRect((row, col), (row, col))