From: Steven P. <n9...@n9...> - 2003-12-04 01:07:59
|
On Dec 3, 2003, at 4:04 PM, Roger Binns wrote: >> It shouldn't affect it's ability to run with 2.4.x at all. > > Sadly that isn't true. I meant more in line with the issue of using wx functions before the wxApp is initialized. That part should be compatible across versions of wx. What I wasn't sure of when I wrote/thought that was how much extra changes would be required. >> 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)) > > The XY methods are not present in 2.4 so there would have to > be conditional code depending on the wx version. I am definitely > not going to put that in while developers would still have to > compile their own copy of wxPython. I understand that, but is conditional code that difficult in Python? I ask not to be a wise guy, but I really don't know. I just started working with Python last night when trying to get this thing running on my system. >> pubsub.py: >> from wx.lib.pubsub import Publication > > It looks like pubsub is being changed somewhat drastically. I dunno, I never used the old version. >> Calendar.attrevenmonth=CalendarCellAttributes() >> Calendar.attroddmonth=CalendarCellAttributes() > > I can see the wx issues with having those as class variables and > will put in a fix. Thanks. >> phonebook.py / phonebookeditor.py: >> remove pubsub references for now > > pubsub is needed for things to work correctly. The program > will appear to run without it, but the category list will > end up being blank and being saved out that way. I am > also about to use it for maintaining the lists of wallpaper > and ringtones. Understandable. I assume they are something like the NSNotification objects in MacOS X. Very nice stuff, I use them all the time. Anyway, here is the error dump I get: An unexpected exception has occurred. Please see the help for details on what to do. Traceback (most recent call last): File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 239, in OnClose self.goforit() File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 236, in goforit self.app.makemainwindow() File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 315, in makemainwindow frame=MainWindow(None, -1, "BitPim", self.config) File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 524, in __init__ self.OnPopulateEverythingFromDisk() File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 792, in OnPopulateEverythingFromDisk self.phonewidget.populate(results) File "/Users/n9yty/my_cvs/bitpim/bitpim/phonebook.py", line 542, in populate pubsub.publish(pubsub.MERGE_CATEGORIES, dict.get('groups', [])) File "/Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py", line 72, in publish Publisher.sendMessage(topic, data) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/wx/lib/pubsub.py", line 141, in sendMessage subscriber[2](message) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/wx/lib/pubsub.py", line 169, in <lambda> return lambda m, f=function: f(m) File "/Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py", line 57, in call return self.__call__(argument) File "/Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py", line 51, in __call__ return getattr(obj, self.methodname)(*args, **kwargs) File "/Users/n9yty/my_cvs/bitpim/bitpim/phonebook.py", line 312, in OnMergeCategories cats=msg.data[:] TypeError: unhashable type Variables by last 6 frames, innermost last Frame publish in /Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py at line 72 topic = ('request', 'mergecategories') data = {} Frame sendMessage in /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages/wx/lib/pubsub.py at line 141 topic = ('request', 'mergecategories') self = <wx.lib.pubsub.Publisher instance at 0x50e22d8> aTopic = <Topic>'request', 'mergecategories'</Topic> subscriber = (<bound method _weaklistener.call of <pubsub._weaklistener i topicList = [(<bound method _weaklistener.call of <pubsub._weaklistener message = <wx.lib.pubsub.Message instance at 0x891e8f0> data = {} Frame <lambda> in /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages/wx/lib/pubsub.py at line 169 m = <wx.lib.pubsub.Message instance at 0x891e8f0> f = <bound method _weaklistener.call of <pubsub._weaklistener in Frame call in /Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py at line 57 self = <pubsub._weaklistener instance at 0x50eb5d0> argument = <wx.lib.pubsub.Message instance at 0x891e8f0> Frame __call__ in /Users/n9yty/my_cvs/bitpim/bitpim/pubsub.py at line 51 self = <pubsub._weaklistener instance at 0x50eb5d0> args = (<wx.lib.pubsub.Message instance at 0x891e8f0>,) obj = <phonebook.CategoryManager instance at 0x50b3ad0> kwargs = {} Frame OnMergeCategories in /Users/n9yty/my_cvs/bitpim/bitpim/phonebook.py at line 312 msg = <wx.lib.pubsub.Message instance at 0x891e8f0> self = <phonebook.CategoryManager instance at 0x50b3ad0> -. ----. -.-- - -.-- Steve Palm - n9...@n9... -. ----. -.-- - -.-- |