hi all,
i've a problem using
wxCheckListBox::SetString
a call to this method crashes my program. i've checked the parameters and
they are correct. code from my programm follows: the wxCheckListBox
represents a collection of layers which can be enabled/disabled using the
checkboxes. the list is updated in the Refresh method of the parent object
(which is a wxPanel in my case).
# this is the method, self.layer_list is the wxCheckListBox
def Refresh(self):
project = Project()
layers = project.layers
self.layer_list.SetSelection(project.active_layer)
for layer in range(len(layers)):
# the following call will crash without a traceback, but with a
exception from XP
self.layer_list.SetString(layer, project.layer[layer].name)
self.layer_list.Check(layer, project.layer[layer].enabled)
wxPanel.Refresh(self)
does anyone have experience with the wxCheckListBox? has this problem
occured before? i'll try to create a smaller test-case to reproduce the
problem but maybe someone can help me beforehand. i played around a bit
(using wxCheckListBox::SetStringSelection which seems to have the same
problem) and it seems that a assert is triggered in the wxWindows code
(something about a wrong string, but i'm not sure) but i'm not wxWindows
expert.
i'm using Python 2.2, wxPython 2.3.2.1 running on a Win XP box.
thanks for your help,
kaweh