diff --git a/CHANGES.rst b/CHANGES.rst index 2b9b4d79..83667fed 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -105,13 +105,14 @@ Changes in this release include the following: * Ensure that the page exists in book controls GetPage and RemovePage methods. At least one of the wx ports do not do this. (#830) +* Added missing wx.NumberEntryDialog + * Change wx.TextCompleterSimple.GetCompletions to send the list of strings as a return value, rather than a parameter that gets filled. (#836) - 4.0.1 "Lemonade" ---------------- * 2-Feb-2018 diff --git a/docs/classic_vs_phoenix.rst b/docs/classic_vs_phoenix.rst index fa42dcce..51d2f2fa 100644 --- a/docs/classic_vs_phoenix.rst +++ b/docs/classic_vs_phoenix.rst @@ -336,7 +336,6 @@ NotebookEvent :class:`wx.BookCtrl NotebookPage ``MISSING`` NotificationMessage :class:`wx.adv.NotificationMessage` NullFileTypeInfo ``MISSING`` -NumberEntryDialog ``MISSING`` Panel_GetClassDefaultAttributes :meth:`wx.Panel.GetClassDefaultAttributes ` PCXHandler ``MISSING`` PlatformInformation_GetOperatingSystemDirectory :meth:`wx.PlatformInfo.GetOperatingSystemDirectory` diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index b2ad6615..70a43fce 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -2402,6 +2402,7 @@ "NullPalette":"wx.", "NullPen":"wx.", "NullRegion":"wx.", +"NumberEntryDialog":"wx.", "NumericPropertyValidator":"wx.propgrid.", "NumericType":"wx.propgrid.NumericPropertyValidator.", "ODCB_DCLICK_CYCLES":"wx.adv.", diff --git a/etg/numdlg.py b/etg/numdlg.py index 97538f2c..e2ccdddb 100644 --- a/etg/numdlg.py +++ b/etg/numdlg.py @@ -17,8 +17,7 @@ DOCSTRING = "" # The classes and/or the basename of the Doxygen XML files to be processed by # this script. -ITEMS = [ 'numdlg_8h.xml', - +ITEMS = [ 'wxNumberEntryDialog', ] #--------------------------------------------------------------------------- @@ -34,6 +33,9 @@ def run(): module.addHeaderCode('#include ') + c = module.find('wxNumberEntryDialog') + tools.fixTopLevelWindowClass(c) + c = module.find('wxGetNumberFromUser') c.mustHaveApp() diff --git a/unittests/test_numdlg.py b/unittests/test_numdlg.py index 6e888a60..cd944a54 100644 --- a/unittests/test_numdlg.py +++ b/unittests/test_numdlg.py @@ -6,9 +6,16 @@ import wx class numdlg_Tests(wtc.WidgetTestCase): - # TODO: Remove this test and add real ones. def test_numdlg1(self): - self.fail("Unit tests for numdlg not implemented yet.") + dlg = wx.NumberEntryDialog(None, "Message", "Prompt", "Caption", 50, 0, 100) + wx.CallLater(250, dlg.EndModal, wx.ID_OK) + dlg.ShowModal() + self.assertEqual(dlg.GetValue(), 50) + dlg.Destroy() + + def test_numdlg2(self): + # Ideally we would call this but don't know how to dismiss the dialog + wx.GetNumberFromUser #---------------------------------------------------------------------------