This is just a curiousity thing -- not really a problem, since I found
what I should have done . . . .
I'm taking a look at one of my older Python apps that use wxPython.
Before I have ran it exclusively on Windows, but (just for curiousity), I
have tried in on Linux. I've never had problems with it on Windows
before, but when I tried to run on Linux, I got this:
176 gideon:~/gfnr2lit > python gfnr2lit.py
Gtk-WARNING **: undefined symbol: gtk_style_apply_default_background
Traceback (most recent call last):
File "gfnr2lit.py", line 428, in ?
app = MainApp(0)
File "/usr/local/lib/python2.1/site-packages/wxPython/wx.py", line 1677, in __init__
_wxStart(self.OnInit)
File "gfnr2lit.py", line 420, in OnInit
frame = MainFrame(None,-1,"fnr2lit configuration")
File "gfnr2lit.py", line 40, in __init__
self.main = MainPanel(self)
File "gfnr2lit.py", line 164, in __init__
self.list = FileList(self)
File "gfnr2lit.py", line 308, in __init__
wxListCtrl.__init__(self,self.parent,listId, pos=wxPoint(sizer[0]/8-50,sizer[1]/8-30), style=wxLC_REPORT|wxSUNKEN_BORDER|wxLC_NO_HEADER)
File "/usr/local/lib/python2.1/site-packages/wxPython/misc.py", line 57, in __getattr__
raise AttributeError,name
AttributeError: __getitem__
I traced it down to how 'sizer' was declared. I assigned it like this:
sizer = self.parent.parent.GetClientSize()
Now I know that I should use:
sizer = self.parent.parent.GetClientSize()
So I changed it . . . and it worked.
So why is the behaviour different with GetClientSize() on Windows than on
Linux?? Just curious . . . I'm running wxPython 2.2.5 on both.
···
--
Mike Hostetler
thehaas@binary.net
http://www.binary.net/thehaas
GnuPG key: http://www.binary.net/thehaas/mikeh.gpg
"What good is having someone who can walk on water if you don't follow
in his footsteps?"