Invalid Request Exception

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
geru
Just popping in
Just popping in
Posts: 7
Joined: Tue Nov 11, 2008 21:14
Location: www.fog3d.org
Contact:

Invalid Request Exception

Postby geru » Thu Nov 27, 2008 22:43

Hi,

I have reestructured my cegui implementation. I made that the class cegui is father of Class widget, and the constructor of Cegui is:

Code: Select all

Cegui::Cegui(Ogre::SceneManager *manager) {
  Ogre::RenderWindow *window = Ogre::Root::getSingleton().getAutoCreatedWindow();
  renderer = new CEGUI::OgreCEGUIRenderer(window, Ogre::RENDER_QUEUE_OVERLAY, false, 0, manager);
  system = new CEGUI::System(renderer);
  wmanager = CEGUI::WindowManager::getSingletonPtr();
}


The widget class inherits of this, and create one menu so that:

Code: Select all

Widget::Widget(Ogre::SceneManager *manager, widgetType type) : Cegui(manager) {
  if (type == MAIN_MENU) {
    mainMenu();
  } else if (type == SINGLETON_BUTTON) {
    drawButton();
  }
}

void Widget::mainMenu() {
     CEGUI::Window *menu = wmanager->loadWindowLayout((CEGUI::utf8*)"shadows.layout");
     system->setGUISheet(menu);
}


But, I receive this error:

Code: Select all

terminate called after throwing an instance of 'CEGUI::InvalidRequestException'
Aborted


And in cegui.log:

Code: Select all

27/11/2008 23:36:18 (Error)   Exception: WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'TaharezLook/FrameWindow' Window objects is not registered with the system.
27/11/2008 23:36:18 (Error)   Exception: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/FrameWindow' objects.
27/11/2008 23:36:18 (Error)   XercesParser::parseXMLFile - An unexpected error occurred while parsing XML file 'shadows.layout'.
27/11/2008 23:36:18 (Error)   WindowManager::loadWindowLayout - loading of layout from file 'shadows.layout' failed.


I don`t know what to do. Somebody can help me, please?

Thanks :-)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Fri Nov 28, 2008 09:48

Hi,

It seems you're not loading the scheme file that creates the mappings for the widget types you're trying to use in the layout.

You need a line such as:

Code: Select all

CEGUI::SchemeManager::getSingleton().loadScheme( "TaharezLook.scheme" );

or similar (this would likely go in the Cegui class constructor with the rest of the initialisation code. You may also consider setting default mouse cursor image, fonts, and tooltips in there.

refer to: The Beginner Guide to Loading Data Files and Initialisation for more info.

CE.

User avatar
geru
Just popping in
Just popping in
Posts: 7
Joined: Tue Nov 11, 2008 21:14
Location: www.fog3d.org
Contact:

Postby geru » Fri Nov 28, 2008 10:21

Ouch! :-S

Thanks you very much again CE. :-)


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests