GenericDatePickerCtrl crashes

Which version?

···

On 1/27/12 2:28 PM, luvspython wrote:

If I delete the displayed date in a GenericDatePickerCtrl window, and
tab or click out of the control, it crashes with the following error:

wx._core.PyAssertionError: C++ assertion "dt.IsValid()" failed at ..\..
\src\msw\calctrl.cpp(262) in wxCalendarCtrl::SetDate(): invalid date

However, if I catch the DATE_CHANGED event, the crash does not occur.
The code below demonstrates the problem, where picker1 and picker3 do
not catch the event and do crash; picker2 does catch the event and
does not crash.

What's going on here?

--
Robin Dunn
Software Craftsman

Try with 2.9.3.1, your sample code worked okay for me with that version.

···

On 2/2/12 7:20 PM, luvspython wrote:

On Jan 30, 2:51 pm, Robin Dunn<ro...@alldunn.com> wrote:

On 1/27/12 2:28 PM,luvspythonwrote:

If I delete the displayed date in a GenericDatePickerCtrl window, and
tab or click out of the control, it crashes with the following error:

wx._core.PyAssertionError: C++ assertion "dt.IsValid()" failed at ..\..
\src\msw\calctrl.cpp(262) in wxCalendarCtrl::SetDate(): invalid date

However, if I catch the DATE_CHANGED event, the crash does not occur.
The code below demonstrates the problem, where picker1 and picker3 do
not catch the event and do crash; picker2 does catch the event and
does not crash.

What's going on here?

Which version?

> wxPython version 2.9.2.4
>

--
Robin Dunn
Software Craftsman

The AuiNotebook is now derived from BookCtrlBase instead of reimplementing all the basic functionality itself. AddPage in BookCtrlBase looks like this:

     virtual bool AddPage(wxWindow *page,
                          const wxString& text,
                          bool select = false,
                          int imageId = -1);

There is still the AddPage in AuiNotebook like the following, but apparently the one in the base class is taking precedence there...

     bool AddPage(wxWindow* page,
                  const wxString& caption,
                  bool select = false,
                  const wxBitmap& bitmap = wxNullBitmap);

···

On 2/5/12 11:42 AM, luvspython wrote:

Robin,
     Many thx for the reply.
     Several things:

1. 2.9.3.1 indeed seems to fix that problem.

2. However, 2.9.3.1 breaks the .AddPage method of AuiNotebook. The
statement:
         self.auinbDataLists.AddPage( self.pnlAllVehicles, u"Vehicles",
False, wx.NullImage )
     works in 2.9.2.4 but in 2.9.31 generates this exception:
       TypeError: in method 'BookCtrlBase_AddPage', expected argument 5
of type 'int'

     If I eliminate that last argument (wx.NullImage), it works. (FYI,
I think FormBuilder creates the wx.NullImage argument.)

--
Robin Dunn
Software Craftsman