Following up from the pms, when I put in your changes to resetList_impl I found that when I populated the list, did a resetList on it, and then repopulated the list once more with ItemEntrys that have the same name, then I'd get the error message:
A Window object with the name 'Blah' already exists within the system
I did a quick check of the new section:
Code: Select all
while (!d_listItems.empty())
{
d_pane->removeChildWindow(d_listItems[0]);
if (d_listItems[0]->isDestroyedByParent())
{
WindowManager::getSingleton().destroyWindow(d_listItems[0]);
}
}
And it appears that both the removeChildWindow and the destroyWindow result in the d_listItems vector dropping an ItemEntry so two are lost each loop, but one is removed as a Child window and not destroyed, while the second one is destroyed but not removed as a Child window.
I tried the following code and it seems to work without this problem:
Code: Select all
while (!d_listItems.empty())
{
ItemEntry* entry = d_listItems[0];
d_pane->removeChildWindow(entry);
if (entry->isDestroyedByParent())
{
WindowManager::getSingleton().destroyWindow(entry);
}
}
I have to admit that I've only given it a quick test however.
Cheers.
![Very Happy :D](./images/smilies/icon_biggrin.gif)