The solution kind of works.
First: I guess the != was a "typo" in your code? Or am i mistaken?
Second: Well, at least that code itself does not crash or throw any exceptions. But it seems to corrupt CEGUI. After renaming all my window like this:
Code: Select all
void Control_Playerframe::renameWindows(void)
{
// Renaming the container
CEGUI::String name = mContainer->getName();
mContainer->rename(getPlayerName() + name);
for (int x = 0; x < mContainer->getChildCount(); ++x)
{
CEGUI::Window * wnd = mContainer->getChildAtIdx(x);
//mWindowManager->renameWindow(wnd, getPlayerName() + wnd->getName());
wnd->rename(getPlayerName() + wnd->getName());
}
}
As you can see I gave it a second try via the WindowManager, that does not change anything
My app throws an ItemNotFound Exception whenever I try to do something with CEGUI afterwards, eg injecting input or rendering it (via ogre). The log looks like this:
12/06/2007 15:01:33 (InfL1) ---- Successfully completed loading of GUI layout from 'Playerframe.layout' ----
12/06/2007 15:01:33 (Error) Exception: WindowManager::getWindow - A Window object with the name 'MarcusPlayerFrame/Container__auto_titlebar__' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: WindowManager::getWindow - A Window object with the name 'MarcusPlayerFrame/Container__auto_titlebar__' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'BlueHighway-14' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'BlueHighway-14' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'BlueHighway-14' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'BlueHighway-14' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'BlueHighway-14' does not exist within the system
12/06/2007 15:01:33 (InfL1) ---- Successfully completed loading of GUI layout from 'Performance.layout' ----
12/06/2007 15:01:33 (Error) Exception: WindowManager::getWindow - A Window object with the name 'MarcusPlayerFrame/Container__auto_titlebar__' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: WindowManager::getWindow - A Window object with the name 'MarcusPlayerFrame/Container__auto_titlebar__' does not exist within the system
12/06/2007 15:01:33 (Error) Exception: WindowManager::getWindow - A Window object with the name 'MarcusPlayerFrame/Container__auto_titlebar__' does not exist within the system
In this case, 'Marcus' is the prefix. This might be a bug, because the corresponding window does not have a titlebar enabled.