Update to wx.NewIdRef() python3
authorGP Orcullo <kinsamanka@gmail.com>
Fri, 28 Oct 2022 20:04:12 +0800
branchpython3
changeset 3766 f99def63cdd8
parent 3765 88fe6fc9fd38
child 3767 485fe0e78bfd
Update to wx.NewIdRef()
BeremizIDE.py
Beremiz_service.py
IDEFrame.py
PLCOpenEditor.py
docutil/dochtml.py
--- a/BeremizIDE.py	Fri Oct 28 19:39:17 2022 +0800
+++ b/BeremizIDE.py	Fri Oct 28 20:04:12 2022 +0800
@@ -230,7 +230,7 @@
             self.YieldLock.release()
 
 
-ID_FILEMENURECENTPROJECTS = wx.NewId()
+ID_FILEMENURECENTPROJECTS = wx.NewIdRef()
 
 
 class Beremiz(IDEFrame, LocalRuntimeMixin):
@@ -349,7 +349,7 @@
 
         self.EditMenuSize = self.EditMenu.GetMenuItemCount()
 
-        inspectorID = wx.NewId()
+        inspectorID = wx.NewIdRef()
         self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, id=inspectorID)
         accels = [wx.AcceleratorEntry(wx.ACCEL_CTRL | wx.ACCEL_ALT, ord('I'), inspectorID)]
 
@@ -374,7 +374,7 @@
                             # itself calling wx.Yield
                             wx.CallLater(50, OnMethod, evt)
                 return OnMethod
-            newid = wx.NewId()
+            newid = wx.NewIdRef()
             self.Bind(wx.EVT_MENU, OnMethodGen(self, method), id=newid)
             accels += [wx.AcceleratorEntry(wx.ACCEL_NORMAL, shortcut, newid)]
 
--- a/Beremiz_service.py	Fri Oct 28 19:39:17 2022 +0800
+++ b/Beremiz_service.py	Fri Oct 28 20:04:12 2022 +0800
@@ -278,15 +278,15 @@
                 self.Tests = tests
 
         class BeremizTaskBarIcon(wx.adv.TaskBarIcon):
-            TBMENU_START = wx.NewId()
-            TBMENU_STOP = wx.NewId()
-            TBMENU_CHANGE_NAME = wx.NewId()
-            TBMENU_CHANGE_PORT = wx.NewId()
-            TBMENU_CHANGE_INTERFACE = wx.NewId()
-            TBMENU_LIVE_SHELL = wx.NewId()
-            TBMENU_WXINSPECTOR = wx.NewId()
-            TBMENU_CHANGE_WD = wx.NewId()
-            TBMENU_QUIT = wx.NewId()
+            TBMENU_START = wx.NewIdRef()
+            TBMENU_STOP = wx.NewIdRef()
+            TBMENU_CHANGE_NAME = wx.NewIdRef()
+            TBMENU_CHANGE_PORT = wx.NewIdRef()
+            TBMENU_CHANGE_INTERFACE = wx.NewIdRef()
+            TBMENU_LIVE_SHELL = wx.NewIdRef()
+            TBMENU_WXINSPECTOR = wx.NewIdRef()
+            TBMENU_CHANGE_WD = wx.NewIdRef()
+            TBMENU_QUIT = wx.NewIdRef()
 
             def __init__(self, pyroserver):
                 wx.adv.TaskBarIcon.__init__(self)
--- a/IDEFrame.py	Fri Oct 28 19:39:17 2022 +0800
+++ b/IDEFrame.py	Fri Oct 28 20:04:12 2022 +0800
@@ -57,7 +57,7 @@
     ID_PLCOPENEDITORTABSOPENED, ID_PLCOPENEDITORTABSOPENED,
     ID_PLCOPENEDITOREDITORMENUTOOLBAR, ID_PLCOPENEDITOREDITORTOOLBAR,
     ID_PLCOPENEDITORPROJECTPANEL,
-] = [wx.NewId() for _init_ctrls in range(17)]
+] = [wx.NewIdRef() for _init_ctrls in range(17)]
 
 # Define PLCOpenEditor EditMenu extra items id
 [
@@ -66,14 +66,14 @@
     ID_PLCOPENEDITOREDITMENUADDPROGRAM, ID_PLCOPENEDITOREDITMENUADDCONFIGURATION,
     ID_PLCOPENEDITOREDITMENUFINDNEXT, ID_PLCOPENEDITOREDITMENUFINDPREVIOUS,
     ID_PLCOPENEDITOREDITMENUSEARCHINPROJECT, ID_PLCOPENEDITOREDITMENUADDRESOURCE
-] = [wx.NewId() for _init_coll_EditMenu_Items in range(10)]
+] = [wx.NewIdRef() for _init_coll_EditMenu_Items in range(10)]
 
 # Define PLCOpenEditor DisplayMenu extra items id
 [
     ID_PLCOPENEDITORDISPLAYMENURESETPERSPECTIVE,
     ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE,
     ID_PLCOPENEDITORDISPLAYMENUFULLSCREEN,
-] = [wx.NewId() for _init_coll_DisplayMenu_Items in range(3)]
+] = [wx.NewIdRef() for _init_coll_DisplayMenu_Items in range(3)]
 
 # -------------------------------------------------------------------------------
 #                            EditorToolBar definitions
@@ -90,7 +90,7 @@
     ID_PLCOPENEDITOREDITORTOOLBARSTEP, ID_PLCOPENEDITOREDITORTOOLBARTRANSITION,
     ID_PLCOPENEDITOREDITORTOOLBARACTIONBLOCK, ID_PLCOPENEDITOREDITORTOOLBARDIVERGENCE,
     ID_PLCOPENEDITOREDITORTOOLBARJUMP, ID_PLCOPENEDITOREDITORTOOLBARMOTION,
-] = [wx.NewId() for _init_coll_DefaultEditorToolBar_Items in range(18)]
+] = [wx.NewIdRef() for _init_coll_DefaultEditorToolBar_Items in range(18)]
 
 
 # -------------------------------------------------------------------------------
--- a/PLCOpenEditor.py	Fri Oct 28 19:39:17 2022 +0800
+++ b/PLCOpenEditor.py	Fri Oct 28 20:04:12 2022 +0800
@@ -64,7 +64,7 @@
 [
     ID_PLCOPENEDITORFILEMENUGENERATE,
     ID_PLCOPENEDITORFILEMENUGENERATEAS,
-] = [wx.NewId() for _init_coll_FileMenu_Items in range(2)]
+] = [wx.NewIdRef() for _init_coll_FileMenu_Items in range(2)]
 
 
 beremiz_dir = paths.AbsDir(__file__)
--- a/docutil/dochtml.py	Fri Oct 28 19:39:17 2022 +0800
+++ b/docutil/dochtml.py	Fri Oct 28 20:04:12 2022 +0800
@@ -41,7 +41,7 @@
         window.Show()
 
 
-EVT_HTML_URL_CLICK = wx.NewId()
+EVT_HTML_URL_CLICK = wx.NewIdRef()
 
 
 class HtmlWindowUrlClick(wx.PyEvent):