Page 1 of 1
Old (.7) Layout editing
Posted: Sat Jun 16, 2012 05:32
by harkathmaker
Hi all,
I just started using the latest snapshot and it looks very exciting! New Christmas toy for a coder
Unfortunately, after I made a pretty new layout with CEED, I couldn't get it to load in CEGUI 0.7.5. It looks like the layout is exporting in the 1.0 format.
Is it possible to export a backwards-compatible layout? I'm making an application to be released soon and prefer to work with a stable CEGUI version.
I have set my project preferences to 0.7 Target version, and the data files are samples/datafiles0_7.
Re: Old (.7) Layout editing
Posted: Sat Jun 16, 2012 06:30
by CrazyEddie
Hi,
It's definitely possible for CEED to create 0.7.x compatible layouts, although there are currently still a couple of things that do not get converted 100% (this mostly involves differences in some values that get set on properties) - so knowing the cause of the issue you're having is very important, not only so that you can work around that if necessary, but also so that future releases of CEED can be further polished.
When the layout does not load in CEGUI 0.7.5 what happens precisely? Meaning, does the app throws an exception, does the layout load but not show correctly or do laser beams shoot from the monitor?
![Very Happy :D](./images/smilies/icon_biggrin.gif)
If you could post the CEGUI.log from the failed load in your app and perhaps even the layout itself - if you are able to do that - then I think it should be easier to narrow down what the issue is.
Thanks,
CE.
Re: Old (.7) Layout editing
Posted: Sat Jun 16, 2012 09:47
by harkathmaker
That's it! The laser beam thing!
Haha, here's the exceptions it's throwing.
Code: Select all
16/06/2012 02:44:32 (Error) CEGUI::UnknownObjectException in file c:\cegui-0.7.5\cegui\src\ceguiwindowfactorymanager.cpp(180) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for '' Window objects is not registered with the system.
16/06/2012 02:44:32 (Error) CEGUI::InvalidRequestException in file c:\cegui-0.7.5\cegui\src\ceguiguilayout_xmlhandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for '' objects.
16/06/2012 02:44:32 (Error) WindowManager::loadWindowLayout - loading of layout from file 'ItemManager.layout' failed.
Re: Old (.7) Layout editing
Posted: Sun Jun 17, 2012 06:33
by harkathmaker
With some testing I found that it's not liking the type attribute in the layout file. When I change it from <Window type="..."> to <window Type="..."> it doesn't throw the exception.
Of course it doesn't solve the loading problem, since the entire layout file is in version 1.0 (it just hits more exceptions).
Re: Old (.7) Layout editing
Posted: Sun Jun 17, 2012 07:31
by CrazyEddie
HI,
Hmmm, that case change for attributes is definitely taken care of by the compatibility layer in CEED. I'm not sure what else could be happening right now if the project is set to target 0.7. In CEED, when you look at the code view tab in the layout editor, how are the attributes cased?
Hopefully Kulik will be able to recognise the issue and offer some more useful advice.
CE.
Re: Old (.7) Layout editing
Posted: Sun Jun 17, 2012 17:22
by Kulik
Set target to CEGUI 0.7, then create a file. It created 1.0 layout that will forever be recognised and saved as 1.0 layout.
Re: Old (.7) Layout editing
Posted: Mon Jun 18, 2012 04:06
by harkathmaker
So there is no way to save in the old format? I guess I should just use the old layout editor until the next CEGUI is released?
Re: Old (.7) Layout editing
Posted: Mon Jun 18, 2012 07:38
by Kulik
Yes, there is a way to save to old layout format. What do you think am I and CE describing in the 2 posts
![Laughing :lol:](./images/smilies/icon_lol.gif)
Re: Old (.7) Layout editing
Posted: Mon Jun 18, 2012 17:50
by harkathmaker
Kulik wrote:Yes, there is a way to save to old layout format. What do you think am I and CE describing in the 2 posts
![Laughing :lol:](./images/smilies/icon_lol.gif)
Ohh sorry, I misread it and thought that setting target to 0.7 still created 1.0 layouts forever
CrazyEddie wrote:In CEED, when you look at the code view tab in the layout editor, how are the attributes cased?
I have the target set to 0.7 and created a new layout, and the code tab looks the same as the saved output, i.e. it's formatted in 1.0 style.
The same thing happens when I open the StockDatafiles0_7.project and make a new layout.
Re: Old (.7) Layout editing
Posted: Mon Jun 18, 2012 20:01
by Kulik
Just tested and this definitely doesn't happen to me.
This is what comes out:
Code: Select all
<GUILayout>
<Window Name="DefaultWindow" Type="DefaultWindow">
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
</Window>
</GUILayout>
Don't check the code tab, it will always display 1.0 format! It's at the time of saving that it gets converted to 0.7 compatible.
Re: Old (.7) Layout editing
Posted: Mon Jun 18, 2012 21:20
by harkathmaker
Started fresh from a new project and it saved successfully in the old format. I must have made my original project settings incorrectly, even though I kept checking that it was set to 0.7...
Since my layout file was saved in 1.0 mode, I guess I'll just go back to the old layout editor to remake it for 0.7
![Sad :(](./images/smilies/icon_sad.gif)
Re: Old (.7) Layout editing
Posted: Tue Jun 19, 2012 00:11
by Kulik
Or you can just use ceed-migrate and migrate them automatically. It uses the same code as CEED internally uses for this. Should do most of the grunt work.
Re: Old (.7) Layout editing
Posted: Tue Jun 19, 2012 19:15
by harkathmaker
Dang... should have looked at the forums before manually remaking it. Ah well.
Does the migrate tool go backwards as well as forwards?
I tried putting in --targetType 0.7 but it didn't seem to like that syntax.