A Window object ... does not exist within the system
Posted: Thu Jan 11, 2007 00:49
My code (straight from the Ogre's Basic Tutorial 6 about CEGUI) compiles cleanly, but the application crashes after loading the window at runtime. I am using VC++ 8.0 and Windows XP Home.
Here is the XML file:
Here is the section of code in createscene where I load the layout:
And here are the last few lines of the CEGUI log:
09/01/2007 17:39:53 (InfL2) ---- Resource loading for GUI scheme 'TaharezLookSkin' completed ----
09/01/2007 17:39:53 (InfL2) ---- Beginning loading of GUI layout from 'Tutorial Gui.xml' ----
09/01/2007 17:39:53 (InfL1) ---- Successfully completed loading of GUI layout from 'Tutorial Gui.xml' ----
09/01/2007 17:39:53 (Error) Exception: WindowManager::getWindow - A Window object with the name 'Quit' does not exist within the system
The xml seems to be loading, but the window name it defines is not being recognized. I copied every CEGUI file included with Ogre into my working directory just to make sure that wasn't the issue. Any idea what I am missing here?
Here is the XML file:
Code: Select all
<?xml version="1.0" ?>
<GUILayout>
<Window Type="DefaultWindow" Name="Tutorial Gui">
<Window Type="TaharezLook/Button" Name="Quit">
<Property Name="AbsoluteRect" Value="l:224.000000 t:216.000000 r:416.000000 b:264.000000" />
<Property Name="RelativeRect" Value="l:0.350000 t:0.450000 r:0.650000 b:0.550000" />
<Property Name="Text" Value="Quit" />
</Window>
</Window>
</GUILayout>
Here is the section of code in createscene where I load the layout:
Code: Select all
mEditorGuiSheet = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"Tutorial Gui.xml");
mGUISystem->setGUISheet(mEditorGuiSheet);
CEGUI::PushButton* quitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().getWindow((CEGUI::utf8*)"Quit");
And here are the last few lines of the CEGUI log:
09/01/2007 17:39:53 (InfL2) ---- Resource loading for GUI scheme 'TaharezLookSkin' completed ----
09/01/2007 17:39:53 (InfL2) ---- Beginning loading of GUI layout from 'Tutorial Gui.xml' ----
09/01/2007 17:39:53 (InfL1) ---- Successfully completed loading of GUI layout from 'Tutorial Gui.xml' ----
09/01/2007 17:39:53 (Error) Exception: WindowManager::getWindow - A Window object with the name 'Quit' does not exist within the system
The xml seems to be loading, but the window name it defines is not being recognized. I copied every CEGUI file included with Ogre into my working directory just to make sure that wasn't the issue. Any idea what I am missing here?