From c3a89aedac5155fa1e8e9f1ec7993fbf9fc65059 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 24 Jun 2018 20:41:49 -0700 Subject: [PATCH] Fix some uses of wx.NewId elsewhere in the docs --- docs/sphinx/_downloads/i18nwxapp/sampleapp.py | 6 +++--- .../sphinx/rest_substitutions/overviews/events_overview.rst | 2 +- .../overviews/standard_event_identifiers.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sphinx/_downloads/i18nwxapp/sampleapp.py b/docs/sphinx/_downloads/i18nwxapp/sampleapp.py index 567c026f..5dd740db 100644 --- a/docs/sphinx/_downloads/i18nwxapp/sampleapp.py +++ b/docs/sphinx/_downloads/i18nwxapp/sampleapp.py @@ -24,7 +24,7 @@ class AppI18N(sc.SizedFrame): # file menu fileMenu = wx.Menu() - closeMenuItem = fileMenu.Append(wx.NewId(), + closeMenuItem = fileMenu.Append(wx.ID_ANY, _(u"Close"), _(u"Close the application")) self.Bind(wx.EVT_MENU, self.onClose, closeMenuItem) @@ -32,7 +32,7 @@ class AppI18N(sc.SizedFrame): # edit menu manageMenu = wx.Menu() - manageSomethingMenuItem = manageMenu.Append(wx.NewId(), + manageSomethingMenuItem = manageMenu.Append(wx.ID_ANY, _(u"Edit something"), _(u"Edit an entry of something")) self.Bind(wx.EVT_MENU, self.doEditSomething, manageSomethingMenuItem) @@ -41,7 +41,7 @@ class AppI18N(sc.SizedFrame): # help menu helpMenu = wx.Menu() - aboutMenuItem = helpMenu.Append(wx.NewId(), + aboutMenuItem = helpMenu.Append(wx.ID_ANY, _(u"&About"), _(u"About the program")) self.Bind(wx.EVT_MENU, self.doAboutBox, aboutMenuItem) diff --git a/docs/sphinx/rest_substitutions/overviews/events_overview.rst b/docs/sphinx/rest_substitutions/overviews/events_overview.rst index 7e09b1aa..6e7b2139 100644 --- a/docs/sphinx/rest_substitutions/overviews/events_overview.rst +++ b/docs/sphinx/rest_substitutions/overviews/events_overview.rst @@ -408,6 +408,6 @@ user-specified identifiers which must be always positive. You can use ``wx.ID_HIGHEST`` to determine the number above which it is safe to define your own identifiers. Or, you can use identifiers below ``wx.ID_LOWEST``. Finally, you can allocate identifiers dynamically -using :func:`wx.NewId` function too. If you use :func:`wx.NewId` +using :func:`wx.NewIdRef` function too. If you use :func:`wx.NewIdRef` consistently in your application, you can be sure that your identifiers don't conflict accidentally. diff --git a/docs/sphinx/rest_substitutions/overviews/standard_event_identifiers.rst b/docs/sphinx/rest_substitutions/overviews/standard_event_identifiers.rst index 7eba2141..f5eda8be 100644 --- a/docs/sphinx/rest_substitutions/overviews/standard_event_identifiers.rst +++ b/docs/sphinx/rest_substitutions/overviews/standard_event_identifiers.rst @@ -26,7 +26,7 @@ used by the user code and also are sometimes used by wxPython itself. These reserved identifiers are all in the range between ``wx.ID_LOWEST`` and ``wx.ID_HIGHEST`` and, accordingly, the user code should avoid defining its own constants in this range (e.g. by using -:func:`wx.NewId` ()). +:func:`wx.NewIdRef` ()). Refer to :ref:`the list of stock items ` for the subset of standard IDs which are stock IDs as well.