Fix some uses of wx.NewId elsewhere in the docs

This commit is contained in:
Robin Dunn
2018-06-24 20:41:49 -07:00
parent 7394f1458b
commit c3a89aedac
3 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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.

View File

@@ -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 <stock items>` for the subset
of standard IDs which are stock IDs as well.