Page 1 of 1

CELayoutEditor 0.6.3 load resource error

Posted: Wed Jul 13, 2011 03:55
by metylbk
I move my custom xml file: common.scheme, common.looknfeel, common.imageset, common.png to datafiles folder of CELayoutEditor. All files work correctly in my project, I just wanna test CELayoutEditor. It throws exception in start:

==================================================
CELayoutEditor has detected and caught an exception. The following detailed info is available:

Description: Error
Exception Location: EditorFrame::LoadData
Exception Message: Scheme::loadResources - The Imageset created by file 'Common.imageset' is named 'Common', not '' as required by Scheme 'Common'.
Exception Filename: ..\..\..\src\CEGUIScheme.cpp
Exception Line: 197
==========================================================
Here is my scheme:
<?xml version="1.0" ?>
<GUIScheme Name="Common">
<Imageset Filename="Common.imageset"/>
<LookNFeel Filename="Common.looknfeel" />
....
</GUIScheme>
And here is my imageset:
<?xml version="1.0" encoding="us-ascii"?>
<Imageset Name="Common" Imagefile="Common.png" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
<Image Name="GrayedOut" XPos="7" YPos="7" Width="28" Height="21" />
...
</Imageset>
I don't know what wrong with my files.

Re: CELayoutEditor 0.6.3 load resource error

Posted: Thu Jul 14, 2011 11:33
by CrazyEddie
Because this version of the editor is compiled against CEGUI 0.6.x, the scheme files must explicitly specify a name for the resources in addition to the filename. So, for example:

Code: Select all

<GUIScheme Name="Common">
<Imageset Name="Common" Filename="Common.imageset"/>
...

This requirement was relaxed in 0.7.x, and the name is obtained automatically, which is why the same files would work in code built against 0.7.x. Note also that there are some differences in layouts for 0.6 and 0.7 - most notably where position (0,0) is for certain windows, such as FrameWindow. You might like to try a more up to date version: http://www.cegui.org.uk/wiki/index.php/ ... oads_0.7.1

CE.