AW: wxListCtrl thread problem

Hi,

if I take out the part that fills the SorterMixin struct, the error
doesn't come up.
Is there a known issue when the mixin struct is reused serveral times or
do I do something basically wrong ?

        # fill sorter struct

···

#
        self.listctrl_sorter[self.listctrl_cnt] = [' ' +
                                                  msg.state,
                                                  msg.date,
                                                  msg.evlpfields['mail
from'],
                                                  msg.evlpfields['rcpt
to'],

msg.headfields['subject'],
                                                  msg.file]
        self.listctrl_cnt += 1

All the best,
Harald

Harald Schneider wrote:

Hi,

if I take out the part that fills the SorterMixin struct, the error
doesn't come up.
Is there a known issue when the mixin struct is reused serveral times or
do I do something basically wrong ?

Ah, this may shed some light on the the subject... Are you calling wxColumnSorterMixin.__init__ more than once? Do you empty the listctrl_sorter when you empty the listctrl and fill it again?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Yes, it was initialized more than once, because I thougt I could force a
kind of garbage collection, but:

- Even when I use __init__ only once and
- I leave addlist() outside the worker thread,

I get that crash when I fill up the sorter struct the 5th time.
When I take out the sorter, everything runs stable, even with
multitrheading.
Are there any issues with reusing the sorter or any means to clean up
the sorter struct and/or the bindung between sorter and listctrl? I
tried to delete and recreate the itemDataMap dictionary but without
effect ...

I'll reduce the app and create an example these days. Thanks for your
time!

All the best,
Harald

···

-----Ursprüngliche Nachricht-----
Von: Robin Dunn [mailto:robin@alldunn.com]
Gesendet: Freitag, 6. Dezember 2002 18:44
An: wxPython-users@lists.wxwindows.org
Betreff: Re: AW: [wxPython-users] wxListCtrl thread problem

Harald Schneider wrote:
> Hi,
>
> if I take out the part that fills the SorterMixin struct, the error
> doesn't come up.
> Is there a known issue when the mixin struct is reused
serveral times or
> do I do something basically wrong ?

Ah, this may shed some light on the the subject... Are you calling
wxColumnSorterMixin.__init__ more than once? Do you empty the
listctrl_sorter when you empty the listctrl and fill it again?

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org