[SOLVED] CELayout editor couldnt open a layout file

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

lakersfan
Just popping in
Just popping in
Posts: 2
Joined: Thu Jul 24, 2008 17:37

[SOLVED] CELayout editor couldnt open a layout file

Postby lakersfan » Thu Jul 24, 2008 20:18

Hi,
When I open the following layout file in CELayout editor I get the following error:
GUILayout_xmlHandler::startElement - layout loading has been aborted since no windowfactory is available for 'StaticImage' objects.

I use CELayout editor 0.6.1 stable release binaries.

The layout file is:
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout>
<Window Type="DefaultWindow" Name="LoginUI" >
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="StaticImage" Name="LoginUI/PoolImage" >
</Window>
</Window>
</GUILayout>

If I remove the Window Type="StaticImage" tag everything is fine. Here is the log from CELayout Editor.

25/07/2008 01:45:50 (Info) ---- Beginning loading of GUI layout from 'C:\projects\Clients\Tim\TcrOgreGui\Data\gui\Testmainmenu.layout' ----
25/07/2008 01:45:50 (Info) Window 'LoginUI' of type 'DefaultWindow' has been created.
25/07/2008 01:45:50 (Error) CEGUI::UnknownObjectException in file \Temp\CEGUI-0.6.1-vc7\src\CEGUIWindowFactoryManager.cpp(123) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'StaticImage' Window objects is not registered with the system.
25/07/2008 01:45:50 (Info) Window 'LoginUI' has been added to dead pool.
25/07/2008 01:45:50 (Error) CEGUI::InvalidRequestException in file \Temp\CEGUI-0.6.1-vc7\src\CEGUIGUILayout_xmlHandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'StaticImage' objects.
25/07/2008 01:45:50 (Error) WindowManager::loadWindowLayout - loading of layout from file 'C:\projects\Clients\Tim\TcrOgreGui\Data\gui\Testmainmenu.layout' failed.
25/07/2008 01:45:56 (Error) CELayoutEditor has detected and caught an exception. The following detailed info is available:

Description: Unexpected Error
Exception Location: EditorDocument::OnOpenDocument
Exception Message: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'StaticImage' objects.
Exception Filename: \Temp\CEGUI-0.6.1-vc7\src\CEGUIGUILayout_xmlHandler.cpp
Exception Line: 233


Any help would be greatly appreciated.

Thanks,
Bharani

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Fri Jul 25, 2008 08:46

Hi and welcome :)

It throws because you don't use the full mapping, using the 'look'. You should use "WindowsLook/StaticImage" for example, or replace "WindowsLook" with your own look name.

If you look at a .scheme file, you see the available full names (mappings) in the "windowType=" attributes.

HTH.
Check out my released snake game using Cegui!

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

Postby CrazyEddie » Fri Jul 25, 2008 08:48

Hi, and welcome :)

Which 'look' / theme is this using? I ask because in the supplied themes, pretty much all the window types are prefixed by the name of the look, as such there is no "StaticImage" but instead "TaharezLook/StaticImage" or "WindowsLook/StaticImage".

So it's failing because you're attempting to create a window type it knows nothing about:

Code: Select all

<Window Type="StaticImage" Name="LoginUI/PoolImage" >


HTH

CE.

asjt3
Just popping in
Just popping in
Posts: 10
Joined: Fri Jun 12, 2009 13:54

Re: [SOLVED] CELayout editor couldnt open a layout file

Postby asjt3 » Fri Jun 12, 2009 18:18

I've got a similar problem: I keep getting the singleton error and I think it's because the program can't find the schemes file, and I don't know why.

It stems from this command:

Code: Select all

CEGUI::Window* panel = wmgr.createWindow("WindowsLook/StaticImage", "Panel 1");
       


and here is my main function:

Code: Select all

int main()
{
   dtCore::SetDataFilePathList( ".;" + dtCore::GetDeltaDataPathList()+ ";" +
      dtCore::GetDeltaRootPath() + "/examples/data;" +
                               dtCore::GetDeltaRootPath() + "/examples/data/gui/imagesets;" +
                               dtCore::GetDeltaRootPath() + "/examples/data/gui/schemes;" +
                               dtCore::GetDeltaRootPath() + "/examples/data/gui/fonts;" +
                               dtCore::GetDeltaRootPath() + "/examples/data/gui/looknfeel;" +
                               dtCore::GetDeltaRootPath() + "/examples/testGUI;");
   cout<<"nnDELTA ROOT = "<<dtCore::GetDeltaRootPath();
   cout<<"nnFull Path = "<<dtCore::GetDataFilePathList();
   dtCore::RefPtr<test2> app = new test2();
   app->Config();
   app->Run();
   
    return 0;
}


Here's the error I'm getting from the CEGUI.log file:

Code: Select all

12/06/2009 13:10:50 (Error)   CEGUI::UnknownObjectException in file c:documents and settingsejohnsonmy documentsprojectscegui-0.6.2srcceguiwindowfactorymanager.cpp(180) :
 WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'WindowsLook/StaticImage' Window objects is not registered with the system.


Any ideas as to why it would be doing this? I set the DataFilePath list to point to the WindowsLook.scheme file... I can provide the config.xml file too if need be

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: [SOLVED] CELayout editor couldnt open a layout file

Postby scriptkid » Mon Jun 15, 2009 08:02

Hi and welcome :),

Do you pass your path data to Cegui somehow? Because your code implies that you expect Cegui to use the system path, which it doesn't.

Have a look at the constructors of the sample's base applications, for example this one:
http://crayzedsgui.svn.sourceforge.net/ ... iew=markup

And then search for 'setResourceGroupDirectory'.

HTH!
Check out my released snake game using Cegui!


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: No registered users and 2 guests