Newbie Question regarding loading schemes and XML

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
wingdongdoodle
Just popping in
Just popping in
Posts: 15
Joined: Tue Mar 15, 2005 21:41

Newbie Question regarding loading schemes and XML

Postby wingdongdoodle » Wed Mar 16, 2005 04:38

i have up to this point managed to get the gui working, and i must say i really like it. Ive been workign witht he layout editor as well, and its also very usefull, since i hate writing GUI elements in code.

however, here are perhaps a few bugs? idiotic mistakes?

at this point in the code:

Code: Select all

SchemeManager::getSingleton().loadScheme((utf8*)"..\\datafiles\\schemes\\TaharezLook.scheme");


(taken from simpleApp - demo 4 with openGL)

i get a strange exception in free.c, it says user exception... not to sure whats happening there, its more aggravating then anything, but something i can ignore.

however, with loading XML layouts using:

Code: Select all

Window* rootWindow = CEGUI::WindowManager::getSingleton().loadWindowLayout("debugConsole.layout");

an error is thrown everytime. i have made sure that the file is where i specify, but i have no clue where i am going wrong. heres my XML file:



Code: Select all

<?xml version="1.0" ?>
<GUILayout>
   <Window Type="DefaultWindow" Name="debugConsole">
      <Window Type="TaharezLook/FrameWindow" Name="console">
         <Property Name="AbsoluteHeight" Value="243.000000" />
         <Property Name="AbsolutePosition" Value="x:1.000000 y:0.000000" />
         <Property Name="AbsoluteRect" Value="l:1.000000 t:0.000000 r:800.000000 b:243.000000" />
         <Property Name="AbsoluteSize" Value="w:799.000000 h:243.000000" />
         <Property Name="AbsoluteWidth" Value="799.000000" />
         <Property Name="AbsoluteXPosition" Value="1.000000" />
         <Property Name="Alpha" Value="0.700000" />
         <Property Name="AlwaysOnTop" Value="True" />
         <Property Name="DragMovingEnabled" Value="False" />
         <Property Name="Height" Value="0.405000" />
         <Property Name="Position" Value="x:0.001250 y:0.000000" />
         <Property Name="Rect" Value="l:0.001250 t:0.000000 r:1.000001 b:0.405000" />
         <Property Name="RelativeHeight" Value="0.405000" />
         <Property Name="RelativePosition" Value="x:0.001250 y:0.000000" />
         <Property Name="RelativeRect" Value="l:0.001250 t:0.000000 r:1.000001 b:0.405000" />
         <Property Name="RelativeSize" Value="w:0.998751 h:0.405000" />
         <Property Name="RelativeWidth" Value="0.998751" />
         <Property Name="RelativeXPosition" Value="0.001250" />
         <Property Name="Size" Value="w:0.998751 h:0.405000" />
         <Property Name="Text" Value="debugConsole" />
         <Property Name="Width" Value="0.998751" />
         <Property Name="XPosition" Value="0.001250" />
         <Window Type="TaharezLook/MultiLineEditbox" Name="consoleOutput">
            <Property Name="AbsoluteHeight" Value="180.000000" />
            <Property Name="AbsolutePosition" Value="x:7.000000 y:29.000000" />
            <Property Name="AbsoluteRect" Value="l:7.000000 t:29.000000 r:788.000000 b:209.000000" />
            <Property Name="AbsoluteSize" Value="w:781.000000 h:180.000000" />
            <Property Name="AbsoluteWidth" Value="781.000000" />
            <Property Name="AbsoluteXPosition" Value="7.000000" />
            <Property Name="AbsoluteYPosition" Value="29.000000" />
            <Property Name="Height" Value="0.738333" />
            <Property Name="Position" Value="x:0.008750 y:0.120000" />
            <Property Name="ReadOnly" Value="True" />
            <Property Name="Rect" Value="l:0.008750 t:0.120000 r:0.986250 b:0.858333" />
            <Property Name="RelativeHeight" Value="0.738333" />
            <Property Name="RelativePosition" Value="x:0.008750 y:0.120000" />
            <Property Name="RelativeRect" Value="l:0.008750 t:0.120000 r:0.986250 b:0.858333" />
            <Property Name="RelativeSize" Value="w:0.977500 h:0.738333" />
            <Property Name="RelativeWidth" Value="0.977500" />
            <Property Name="RelativeXPosition" Value="0.008750" />
            <Property Name="RelativeYPosition" Value="0.120000" />
            <Property Name="Size" Value="w:0.977500 h:0.738333" />
            <Property Name="Text" Value="] Debug console using CE GUI
" />
            <Property Name="Width" Value="0.977500" />
            <Property Name="XPosition" Value="0.008750" />
            <Property Name="YPosition" Value="0.120000" />
            </Window>
         <Window Type="TaharezLook/Editbox" Name="consoleInput">
            <Property Name="AbsoluteHeight" Value="30.000000" />
            <Property Name="AbsolutePosition" Value="x:9.000000 y:209.000000" />
            <Property Name="AbsoluteRect" Value="l:9.000000 t:209.000000 r:669.000000 b:239.000000" />
            <Property Name="AbsoluteSize" Value="w:660.000000 h:30.000000" />
            <Property Name="AbsoluteWidth" Value="660.000000" />
            <Property Name="AbsoluteXPosition" Value="9.000000" />
            <Property Name="AbsoluteYPosition" Value="209.000000" />
            <Property Name="Height" Value="0.120000" />
            <Property Name="Position" Value="x:0.011250 y:0.861667" />
            <Property Name="Rect" Value="l:0.011250 t:0.861667 r:0.837500 b:0.981667" />
            <Property Name="RelativeHeight" Value="0.120000" />
            <Property Name="RelativePosition" Value="x:0.011250 y:0.861667" />
            <Property Name="RelativeRect" Value="l:0.011250 t:0.861667 r:0.837500 b:0.981667" />
            <Property Name="RelativeSize" Value="w:0.826250 h:0.120000" />
            <Property Name="RelativeWidth" Value="0.826250" />
            <Property Name="RelativeXPosition" Value="0.011250" />
            <Property Name="RelativeYPosition" Value="0.861667" />
            <Property Name="Size" Value="w:0.826250 h:0.120000" />
            <Property Name="Width" Value="0.826250" />
            <Property Name="XPosition" Value="0.011250" />
            <Property Name="YPosition" Value="0.861667" />
            </Window>
         <Window Type="TaharezLook/Button" Name="inputSendButton">
            <Property Name="AbsoluteHeight" Value="29.000000" />
            <Property Name="AbsolutePosition" Value="x:672.000000 y:210.000000" />
            <Property Name="AbsoluteRect" Value="l:672.000000 t:210.000000 r:788.000000 b:239.000000" />
            <Property Name="AbsoluteSize" Value="w:116.000000 h:29.000000" />
            <Property Name="AbsoluteWidth" Value="116.000000" />
            <Property Name="AbsoluteXPosition" Value="672.000000" />
            <Property Name="AbsoluteYPosition" Value="210.000000" />
            <Property Name="Height" Value="0.116667" />
            <Property Name="Position" Value="x:0.841250 y:0.865000" />
            <Property Name="Rect" Value="l:0.841250 t:0.865000 r:0.986250 b:0.981666" />
            <Property Name="RelativeHeight" Value="0.116667" />
            <Property Name="RelativePosition" Value="x:0.841250 y:0.865000" />
            <Property Name="RelativeRect" Value="l:0.841250 t:0.865000 r:0.986250 b:0.981666" />
            <Property Name="RelativeSize" Value="w:0.145000 h:0.116667" />
            <Property Name="RelativeWidth" Value="0.145000" />
            <Property Name="RelativeXPosition" Value="0.841250" />
            <Property Name="RelativeYPosition" Value="0.865000" />
            <Property Name="Size" Value="w:0.145000 h:0.116667" />
            <Property Name="Text" Value="Enter" />
            <Property Name="Width" Value="0.145000" />
            <Property Name="XPosition" Value="0.841250" />
            <Property Name="YPosition" Value="0.865000" />
            </Window>
         </Window>
      </Window>
</GUILayout>






any suggestions would be appreciated :)

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

Re: Newbie Question regarding loading schemes and XML

Postby CrazyEddie » Wed Mar 16, 2005 09:38

What is the exception being thrown (or alternatively, are there any errors listed in CEGUI.log)?

Thanks,

CE.

Guest

Re: Newbie Question regarding loading schemes and XML

Postby Guest » Wed Mar 16, 2005 09:50

I thought a "DefaultGUISheet" was required as a root window.
Am i wrong?

--
Chris

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

Re: Newbie Question regarding loading schemes and XML

Postby CrazyEddie » Wed Mar 16, 2005 10:50

ChrisKang wrote:
I thought a "DefaultGUISheet" was required as a root window.

"DefaultWindow" is an alias for "DeafultGUISheet" ;) While it is common to use these as the root window, the system does not require it; you could just as easily use a radio button as the root (though you probably wouldn't want to :)

CE.

User avatar
wingdongdoodle
Just popping in
Just popping in
Posts: 15
Joined: Tue Mar 15, 2005 21:41

Re: Newbie Question regarding loading schemes and XML

Postby wingdongdoodle » Wed Mar 16, 2005 18:23

ok, i have an interesting story. My compuer died when i installed DX9 SDK, so i had to system restore, without thinking i lost a lot of work i had done with code. SO i re-downloaded CEGUI, dependencies, etc. and discovered i had accidently downloaded 0.1.0 first (thats the one i had working).

im using SDL + OGL + CEGUI, so i dont have a demo app to test with, so i have been having trouble discovering what was goign wrong. It appears that for some reason, no matter what path i load my layout/scheme/font from, the XSD files were required to be in the workign directory of my executable, and not the path of the file i tried to load. I figured otu eveything that was goign wrong :)

sorry for asking these poitnless questions, since there isnt any documentation or demos im jsut kind of learning these things on my own. If you would like, after i hae had a chance to play around with the code some more, id be more then willing to create an OGL+CEGUI or SDL+OGL+CEGUI basic application tutorial. Thanks for atempting to help at least :)

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

Re: Newbie Question regarding loading schemes and XML

Postby CrazyEddie » Wed Mar 16, 2005 20:57

Hey that's cool.

The thing with the XSDs was an unintentional breaking change. In fact the original behavior was unintentional as well :roll: The situation now, in CVS-HEAD, is that the original behavior (of looking in two places for the XSD) has been restored. Having said this, that does not mean I recommend updating to CVS-HEAD (unless you already did ;) ).

The offer of a tutorial is very welcome, I'd be happy to get this, as tutorials and non API reference documentation is the main thing missing at the moment :)
CE


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 22 guests