lib/calendar.py problem & patch

Yesterday while playing with the calendar controls in the demo I ran
into a bug in the wx.lib.calendar module. In the wxPython demo, pull up
the calendar demo and select the date 4/30/04. Now use the year buttons
(or spinner, in the case of the Calendar dialog) to change the year to
2003. A traceback occurs. Decreasing the year once more causes a loop
of tracebacks to ensue. (Note: This isn't a problem with the calendar
window test as it throws away the selected day of month when the year
changes.)

I've attached a simple patch for this. Also: Is it customary to send
patches directly to the author of the contrib or is it reasonable to
send them here?

-BA

lib-calendar.patch (964 Bytes)

Brian Almond wrote:

Yesterday while playing with the calendar controls in the demo I ran
into a bug in the wx.lib.calendar module. In the wxPython demo, pull up
the calendar demo and select the date 4/30/04. Now use the year buttons
(or spinner, in the case of the Calendar dialog) to change the year to
2003. A traceback occurs. Decreasing the year once more causes a loop
of tracebacks to ensue. (Note: This isn't a problem with the calendar
window test as it throws away the selected day of month when the year
changes.)

I've attached a simple patch for this.

Thanks!

Also: Is it customary to send
patches directly to the author of the contrib or is it reasonable to
send them here?

Usually sending them here is fine.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!