problem with loading a gui sheet. (not registering scheme)

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

eggman3344
Just popping in
Just popping in
Posts: 10
Joined: Mon Aug 01, 2011 17:43

problem with loading a gui sheet. (not registering scheme)

Postby eggman3344 » Mon Aug 01, 2011 17:51

Ok, well, I'm having this one little problem right now.......anyways, i used CEGUI's layout editor and all seemed good until i tried to use it and got this nasty little error:

Code: Select all


01/08/2011 13:11:19 (Error)   CEGUI::UnknownObjectException in file c:\cegui-0.7.4\cegui\src\ceguiwindowfactorymanager.cpp(180) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'TaharezLook/FrameWindow' Window objects is not registered with the system.
01/08/2011 13:11:19 (Error)   CEGUI::InvalidRequestException in file c:\cegui-0.7.4\cegui\src\ceguiguilayout_xmlhandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/FrameWindow' objects.
01/08/2011 13:11:19 (Error)   WindowManager::loadWindowLayout - loading of layout from file 'mainmenu.layout' failed.





Here is my CEGUI init function:

Code: Select all


bool OgreFramework::initGUI()
{
   try
   {
      m_pOgreRenderer = new CEGUI::OgreRenderer(CEGUI::OgreRenderer::bootstrapSystem());

      if(m_pOgreRenderer)
      {
         return true;
      }
      CEGUI::Imageset::setDefaultResourceGroup("Imagesets");
      CEGUI::Font::setDefaultResourceGroup("Fonts");
      CEGUI::Scheme::setDefaultResourceGroup("Schemes");
      CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel");
      CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
   
      CEGUI::SchemeManager::getSingletonPtr()->create("TaharezLook.Scheme");
   }
   catch(CEGUI::Exception &e)
   {
      MessageBoxA(NULL,e.getMessage().c_str(),"",MB_OK | MB_ICONERROR);
   }




   return true;
}




not sure what else to post other then this.......oh wait:

Code: Select all


   try
   {
      this->m_pWindowRoot = CEGUI::WindowManager::getSingletonPtr()->loadWindowLayout("mainmenu.layout");
      m_pMenu = m_pWindowRoot->getChild("main_menu");

      m_pNew_Game = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("New_Game"));
      m_pLoad_Game = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("Load_game"));
      m_pSave_Game = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("Save_game"));
      m_pOptions    = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("options"));
      m_pExit      = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("Exit"));

      m_pNew_Game->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&MenuState::new_game,this));
      OgreFramework::getSingletonPtr()->m_pSystem->setGUISheet(m_pMenu);
   }
   catch(CEGUI::Exception & e)
   {
      MessageBoxA(NULL,e.getMessage().c_str(),"",MB_OK | MB_ICONERROR);
   }





also i thought i'd give the xml layout:

Code: Select all



<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="Root" >
        <Property Name="Alpha" Value="0.5" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
        <Window Type="TaharezLook/FrameWindow" Name="main_menu" >
            <Property Name="Font" Value="DejaVuSans-10" />
            <Property Name="Text" >Menu
</Property>
            <Property Name="TitlebarFont" Value="DejaVuSans-10" />
            <Property Name="RollUpEnabled" Value="False" />
            <Property Name="TitlebarEnabled" Value="True" />
            <Property Name="UnifiedAreaRect" Value="{{0.249111,0},{0.195833,0},{0.597744,0},{0.681509,0}}" />
            <Property Name="CloseButtonEnabled" Value="False" />
            <Property Name="EWSizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
            <Property Name="NSSizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
            <Property Name="NESWSizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
            <Property Name="NWSESizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
            <Window Type="TaharezLook/Button" Name="New_Game" >
                <Property Name="Font" Value="DejaVuSans-10" />
                <Property Name="Text" >New Game
</Property>
                <Property Name="UnifiedAreaRect" Value="{{0.0122449,0},{0.00677916,0},{0.97653,0},{0.18186,0}}" />
                <Property Name="WantsMultiClickEvents" Value="False" />
            </Window>
            <Window Type="TaharezLook/Button" Name="Save_Game" >
                <Property Name="Font" Value="DejaVuSans-10" />
                <Property Name="Text" >save game
</Property>
                <Property Name="UnifiedAreaRect" Value="{{0.0138056,0},{0.190554,0},{0.972088,0},{0.342834,0}}" />
                <Property Name="WantsMultiClickEvents" Value="False" />
            </Window>
            <Window Type="TaharezLook/Button" Name="Load_Game" >
                <Property Name="Font" Value="DejaVuSans-10" />
                <Property Name="Text" Value="Load Game" />
                <Property Name="UnifiedAreaRect" Value="{{0.0207283,0},{0.356352,0},{0.971008,0},{0.524919,0}}" />
                <Property Name="WantsMultiClickEvents" Value="False" />
            </Window>
            <Window Type="TaharezLook/Button" Name="Options" >
                <Property Name="Font" Value="DejaVuSans-10" />
                <Property Name="Text" >Options
</Property>
                <Property Name="UnifiedAreaRect" Value="{{0.0282913,0},{0.534528,0},{0.961765,0},{0.703095,0}}" />
                <Property Name="WantsMultiClickEvents" Value="False" />
            </Window>
            <Window Type="TaharezLook/Button" Name="Exit" >
                <Property Name="Font" Value="DejaVuSans-10" />
                <Property Name="Text" >Exit
</Property>
                <Property Name="UnifiedAreaRect" Value="{{0.0330532,0},{0.719219,0},{0.955323,0},{0.868241,0}}" />
            </Window>
        </Window>
    </Window>
</GUILayout>




ok that's all i've got.......

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: problem with loading a gui sheet. (not registering schem

Postby Kulik » Mon Aug 01, 2011 18:25

Full CEGUI.log please, it allows us to quickly check that everything got loaded.

eggman3344
Just popping in
Just popping in
Posts: 10
Joined: Mon Aug 01, 2011 17:43

Re: problem with loading a gui sheet. (not registering schem

Postby eggman3344 » Mon Aug 01, 2011 18:27

Code: Select all

01/08/2011 13:11:19 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
01/08/2011 13:11:19 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
01/08/2011 13:11:19 (Std)    +                          (http://www.cegui.org.uk/)                         +
01/08/2011 13:11:19 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

01/08/2011 13:11:19 (Std)    CEGUI::Logger singleton created. (07833188)
01/08/2011 13:11:19 (Std)    
01/08/2011 13:11:19 (Std)    ********************************************************************************
01/08/2011 13:11:19 (Std)    * Important:                                                                   *
01/08/2011 13:11:19 (Std)    *     To get support at the CEGUI forums, you must post _at least_ the section *
01/08/2011 13:11:19 (Std)    *     of this log file indicated below.  Failure to do this will result in no  *
01/08/2011 13:11:19 (Std)    *     support being given; please do not waste our time.                       *
01/08/2011 13:11:19 (Std)    ********************************************************************************
01/08/2011 13:11:19 (Std)    ********************************************************************************
01/08/2011 13:11:19 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
01/08/2011 13:11:19 (Std)    ********************************************************************************
01/08/2011 13:11:19 (Std)    ---- Version 0.7.4 (Build: Oct 11 2010 Debug Microsoft Windows MSVC++ 9.0 32 bit) ----
01/08/2011 13:11:19 (Std)    ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
01/08/2011 13:11:19 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
01/08/2011 13:11:19 (Std)    ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
01/08/2011 13:11:19 (Std)    ---- Scripting module is: None ----
01/08/2011 13:11:19 (Std)    ********************************************************************************
01/08/2011 13:11:19 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
01/08/2011 13:11:19 (Std)    ********************************************************************************
01/08/2011 13:11:19 (Std)    
01/08/2011 13:11:19 (Std)    ---- Begining CEGUI System initialisation ----
01/08/2011 13:11:19 (Std)    CEGUI::ImagesetManager singleton created (077FB290)
01/08/2011 13:11:19 (Std)    CEGUI::FontManager singleton created. (07894048)
01/08/2011 13:11:19 (Std)    CEGUI::WindowFactoryManager singleton created
01/08/2011 13:11:19 (Std)    CEGUI::WindowManager singleton created (07832B78)
01/08/2011 13:11:19 (Std)    CEGUI::SchemeManager singleton created. (00FFB258)
01/08/2011 13:11:19 (Std)    CEGUI::MouseCursor singleton created. (0783A070)
01/08/2011 13:11:19 (Std)    CEGUI::GlobalEventSet singleton created. (077FB558)
01/08/2011 13:11:19 (Std)    CEGUI::AnimationManager singleton created (077FB3A8)
01/08/2011 13:11:19 (Std)    CEGUI::WidgetLookManager singleton created. (00F49438)
01/08/2011 13:11:19 (Std)    CEGUI::WindowRendererManager singleton created (00F496D0)
01/08/2011 13:11:19 (Std)    CEGUI::RenderEffectManager singleton created (07835E10)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'DefaultWindow' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'DefaultWindow' windows added. (00F54F40)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'DragContainer' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'DragContainer' windows added. (00F55100)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'ScrolledContainer' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'ScrolledContainer' windows added. (00F552C0)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'ClippedContainer' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'ClippedContainer' windows added. (00F80F30)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Checkbox' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (00F55568)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/PushButton' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (00F557C8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/RadioButton' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (00F55988)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Combobox' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (00F55B48)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/ComboDropList' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (00F55D08)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Editbox' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (00F55EC8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/FrameWindow' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (00F56088)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/ItemEntry' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (078369D8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Listbox' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (07836B98)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/ListHeader' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (07836D58)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/ListHeaderSegment' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (07836F18)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Menubar' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (078371A8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/PopupMenu' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (07837368)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/MenuItem' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (07837528)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/MultiColumnList' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (078376E8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/MultiLineEditbox' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (078378A8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/ProgressBar' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (07837A68)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/ScrollablePane' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (07837C28)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Scrollbar' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (07837DE8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Slider' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (07837FA8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Spinner' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (07838168)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/TabButton' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (07838328)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/TabControl' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (078384E8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Thumb' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (078386A8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Titlebar' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (07818F20)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Tooltip' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (078191C8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/ItemListbox' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (07819388)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/GroupBox' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (07819548)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'CEGUI/Tree' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (07819708)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'HorizontalLayoutContainer' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'HorizontalLayoutContainer' windows added. (078198C8)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'VerticalLayoutContainer' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'VerticalLayoutContainer' windows added. (07819A88)
01/08/2011 13:11:19 (Std)    Created WindowFactory for 'GridLayoutContainer' windows.
01/08/2011 13:11:19 (Std)    WindowFactory for 'GridLayoutContainer' windows added. (07819C48)
01/08/2011 13:11:19 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
01/08/2011 13:11:19 (Std)    CEGUI::System singleton created. (00F43B78)
01/08/2011 13:11:19 (Std)    ---- CEGUI System initialisation completed ----
01/08/2011 13:11:19 (Std)    
01/08/2011 13:11:19 (Error)   CEGUI::UnknownObjectException in file c:\cegui-0.7.4\cegui\src\ceguiwindowfactorymanager.cpp(180) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'TaharezLook/FrameWindow' Window objects is not registered with the system.
01/08/2011 13:11:19 (Error)   CEGUI::InvalidRequestException in file c:\cegui-0.7.4\cegui\src\ceguiguilayout_xmlhandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/FrameWindow' objects.
01/08/2011 13:11:19 (Error)   WindowManager::loadWindowLayout - loading of layout from file 'mainmenu.layout' failed.







right, sorry........hehe

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: problem with loading a gui sheet. (not registering schem

Postby Kulik » Mon Aug 01, 2011 18:39

Code: Select all

      if(m_pOgreRenderer)
      {
         return true;
      }


Hehe, mystery solved ;-)

EDIT: Also, you are using it wrong, check the docs on initializing CEGUI.

eggman3344
Just popping in
Just popping in
Posts: 10
Joined: Mon Aug 01, 2011 17:43

Re: problem with loading a gui sheet. (not registering schem

Postby eggman3344 » Mon Aug 01, 2011 19:07

well, i was going off of the Basic Tutorial of Ogre # 7 so you'll excuse me if i did it wrong the way i'm using it has always worked for me so i thought this was the right way


Return to “Help”

Who is online

Users browsing this forum: No registered users and 6 guests