Hi list,
Again a compatibility problem Linux GTK and Windows. Python 2.3.3, wxPython
2.5.1.5 (and lots of other packages)
The following code runs fine on Linux.
--- snip ----
def BldChoice(self):
Groepen = Opendb.TableObjs.RegTable("ClientenGroepen").GetTable()
self.t = {}
n = 0
for R in Groepen.select('').fetchall():
self.Clientengroepenlist.Append(R.tab_naam,(R.tab_id,false))
self.t[R.tab_id] = n
n += 1
--- snip ----
But it gives me an assert on Win XP:
Traceback (most recent call last):
File "/home/dick/Clienten/src/DefColumns.py", line 985, in ExecEdit
File "/home/dick/Clienten/src/DefColumns.py", line 1010, in ExecOndh
File "<string>", line 1, in ?
File "C:\Program Files\Clienten\src\Ondclienten.py", line 13, in create
return ClientenOnderhoudsscherm(action, parent, "Onderhoud
Clientgegevens")
File "/home/dick/Clienten/src/GenScrn.py", line 797, in __init__
File "C:\Program Files\Clienten\src\Ondclienten.py", line 28, in PanelDef
return ClientenOnderhoudsPanel(action, self)
File "C:\Program Files\Clienten\src\Ondclienten.py", line 98, in __init__
self.UpdateData()
File "C:\Program Files\Clienten\src\Ondclienten.py", line 104, in UpdateData
if not self.operation == "Q": self.BldChoice()
File "C:\Program Files\Clienten\src\Ondclienten.py", line 136, in BldChoice
self.Clientengroepenlist.Append(R.tab_naam,(R.tab_id,false))
File "C:\PROGRA~1\Python2.3\Lib\site-packages\wx\core.py", line 7976, in
Append
return _core.ItemContainer_Append(*args, **kwargs)
wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in ..\..
\src\msw\listbox.cpp(467): Can't use client data with owner-drawn listboxes
Reading the manual I noticed the following remark:
This class is currently implemented under Windows and GTK. When using this
class under Windows wxWindows must be compiled with USE_OWNER_DRAWN set to 1.
I simply installed wxPython from the site on WIN-XP, so could it be that it is
compiled without this switch or is there another explanation.
Cheers,
D.Kniep