On Wednesday 20 June 2007 22:08, johnf wrote:
> Currently, the dDateTextBox is in the format of YMD. When the user starts
> to type in a date and then double clicks on the date box an error occurs in
> the wx - Calendar.py.
> on
> assert isinstance(date, (datetime.datetime, datetime.date))
>
> below from Calendar.py
> def _pydate2wxdate(date):
> import datetime
> assert isinstance(date, (datetime.datetime, datetime.date))
> tt = date.timetuple()
> dmy = (tt[2], tt[1]-1, tt[0])
> return wx.DateTimeFromDMY(*dmy)
>
> I'd show the traceback but it only occurs once in a while and I can't seem
> to reproduce it at the moment.
>
> SUSE 10.2, python 2.5, wxPython 2.6
OK got the traceback
Traceback (most recent call last):
File "/home/johnf/downloads/dabo/dabo/lib/eventMixin.py", line 98, in
raiseEvent
bindingFunction(event)
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dDateTextBox.py", line 122, in
__onDblClick
self.showCalendar()
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dDateTextBox.py", line 130, in
showCalendar
self.calPanel = CalPanel(self.Parent, dt=self.Value, ctrl=self)
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dDateTextBox.py", line 25, in
__init__
super(CalPanel, self).__init__(parent, pos=pos)
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dPanel.py", line 158, in
__init__
_PanelMixin.__init__(self, preClass, parent, properties, attProperties,
*args, **kwargs)
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dPanel.py", line 32, in
__init__
*args, **kwargs)
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dPemMixin.py", line 184, in
__init__
self._afterInit()
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dPemMixin.py", line 298, in
_afterInit
self.afterInit()
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dDateTextBox.py", line 33, in
afterInit
self.cal.Date = self.date
File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dCalendar.py", line 185, in
_setDate
self.PySetDate(val)
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/calendar.py",
line 513, in PySetDate
self.SetDate(_pydate2wxdate(date))
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/calendar.py",
line 579, in _pydate2wxdate
assert isinstance(date, (datetime.datetime, datetime.date))
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]