If I remove a tab then add it again the windowmanager throws an AlreadyExistsException, even though i destroy the tabwindow.
Code: Select all
CEGUI::Window* defaultwin=CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)"DefaultWindow",(CEGUI::utf8*)"Test1");
tabCtrl->addTab(defaultwin);
....
tabCtrl->removeTab(defaultwin);
CEGUI::WindowManager::getSingleton().destroyWindow(defaultwin);
...
CEGUI::Window* defaultwin2=CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)"DefaultWindow",(CEGUI::utf8*)"Test1");
tabCtrl->addTab(defaultwin2); // error thrown
I recon this has something to do with the TabButton (error log: Exception: WindowManager::createWindow - A Window object with the name 'btnTest1' already exists within the system. ) but I haven't been able to resolve the problem. I tried destroying the button in TabControl::removeButtonForTabContent but this turned out to be the wrong place

Maybe I'm doing something wrong with deleting the tab? Any hints where I should look?
Cheers
Tom