From: Steven P. <n9...@n9...> - 2003-12-03 21:22:04
|
On Dec 3, 2003, at 10:19 AM, Steven Palm wrote: > I am just learning Python, and don't know enough yet to find a > workaround for this issue. Is there any interest in making this > forward compatible with the upcoming 2.5.x release of wxPython?? It > shouldn't affect it's ability to run with 2.4.x at all. I've surprised myself and managed to plod along enough to figure it out. Here are my changes (so far!) to get it working. By removing the pubsub stuff, I can get basic functionality to work with these changes. I don't have a phone yet, so I cannot test serial communications and the like, but the program itself seems to operate now with wxPython 2.5.1 fromCVS. These are cryptic notes, I admit, but hopefully enough to go by.... Global in all .py files: DrawText( becomes DrawTextXY( DrawBitmap( becomes DrawBitmapXY( DrawRotatedText( becomes DrawRotatedTextXY( DrawLine(x1, y1, x2, y2) becomes DrawLine((x1, y1), (x2, y2)) pubsub.py: from wx.lib.pubsub import Publication calendarcontrol.py: Class Calendar(wxPanel): . . . def initvars(self): Calendar.attrevenmonth=CalendarCellAttributes() Calendar.attroddmonth=CalendarCellAttributes() Calendar.attroddmonth.cellbackground=wxTheBrushList.FindOrCreateBrush( wxColour(255, 255, 230), wxSOLID) Calendar.attrselectedcell=CalendarCellAttributes() Calendar.attrselectedcell.cellbackground=wxTheBrushList.FindOrCreateBrus h( wxColour(240,240,240), wxSOLID) Calendar.attrselectedcell.labelfont=wxFont(17, wxSWISS, wxNORMAL, wxBOLD ) Calendar.attrselectedcell.labelforeground=wxNamedColour("BLACK") gui.py: + import sys #import wxPython.help # import wxPython.gizmosc as gizmosc - from wxPython.htmlhelp import wxHtmlHelpController + from wxPython.html import wxHtmlHelpController dc.DrawText( becomes dc.DrawTextXY phonebook.py / phonebookeditor.py: remove pubsub references for now I have to look into the pubsub stuff.... -. ----. -.-- - -.-- Steve Palm - n9...@n9... -. ----. -.-- - -.-- |