Apologies if this belongs in the dev list.
I’m hitting a few issues when deleting and repopulating ultimatelistctrl:
First, after deleting and repopulating the list, the current row is one past the end of the list, making a lot of behavior fail. This appears to be related to the call to UpdateCurrent() on line 9817 of ultimatelistctrl.py. I’m not sure what this call is for, but removing it seems to fix the problem.
Second, ClearAll doesn’t appear to remove all the child windows of the list. I believe this is related to editing _itemWithWindow while iterating through it. Copying it and iterating a copy on line 10039 instead seems to fix this.
I’ve attached a patch of my attempted fixes. Are these helpful?
Thanks,
Steven
list.diff (750 Bytes)
Hi,
Apologies if this belongs in the dev list.
It's OK to post here as well, it gives the message a bit more
visibility as there are many more developers following wxPython-users
than the wxPython-dev mailing list.
I'm hitting a few issues when deleting and repopulating ultimatelistctrl:
First, after deleting and repopulating the list, the current row is one past
the end of the list, making a lot of behavior fail. This appears to be
related to the call to UpdateCurrent() on line 9817 of ultimatelistctrl.py.
I'm not sure what this call is for, but removing it seems to fix the
problem.
Second, ClearAll doesn't appear to remove all the child windows of the list.
I believe this is related to editing _itemWithWindow while iterating through
it. Copying it and iterating a copy on line 10039 instead seems to fix this.
I've attached a patch of my attempted fixes. Are these helpful?
They are, thank you for contributing to AGW. I'll apply your patch to
the SVN version of ULC when I get back home tonight.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On 14 May 2012 18:00, Steven Wallace wrote:
Patch applied in SVN, thank you for your contribution!
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On 14 May 2012 18:00, Steven Wallace wrote:
Apologies if this belongs in the dev list.
I'm hitting a few issues when deleting and repopulating ultimatelistctrl:
First, after deleting and repopulating the list, the current row is one past
the end of the list, making a lot of behavior fail. This appears to be
related to the call to UpdateCurrent() on line 9817 of ultimatelistctrl.py.
I'm not sure what this call is for, but removing it seems to fix the
problem.
Second, ClearAll doesn't appear to remove all the child windows of the list.
I believe this is related to editing _itemWithWindow while iterating through
it. Copying it and iterating a copy on line 10039 instead seems to fix this.
I've attached a patch of my attempted fixes. Are these helpful?