Page 1 of 1

XML reading bug ?

Posted: Sun Aug 20, 2006 19:28
by Pompei2
Hello, I sumbled over this strange behaivour that, for me, is a bug:

Code: Select all

<Window Type="SleekSpace/FrameWindow" Name="Welcome">
   <Property Name="UnifiedPosition" Value="{{0.25,0},{0.25,0}}" />
   <Property Name="UnifiedSize"     Value="{{0.5,0},{0.5,0}}" />
   <Property Name="UnifiedMaxSize"  Value="{{0.8,0},{0.8,0}}" />
   <Property Name="UnifiedMinSize"  Value="{{0.25,0},{0.25,0}}" />
</window>

(not the complete file)

This code works perfectly, but as I'm a person that like things to be aligned, I want to write this:

Code: Select all

<Window Type="SleekSpace/FrameWindow" Name="Welcome">
   <Property Name="UnifiedPosition" Value="{{0.25,0},{0.25,0}}" />
   <Property Name="UnifiedSize"     Value="{{0.5 ,0},{0.5 ,0}}" />
   <Property Name="UnifiedMaxSize"  Value="{{0.8 ,0},{0.8 ,0}}" />
   <Property Name="UnifiedMinSize"  Value="{{0.25,0},{0.25,0}}" />
</window>


And I run my program again and woeps ! Strange ... The height of my window is now the minimum (0.25) and I can't change it !! But the width is right and I can change it like intended.

I'd like to know if this is a bug in CEGUI and if yes, will it be fixed for the official release 0.5.0 ?

ah yes, I use TinyXML as parser and didn't try it on an other parser yet (didn't compile any other parser, in fact.)

Re: XML reading bug ?

Posted: Mon Aug 21, 2006 13:32
by Dalfy
Pompei2 wrote:Hello, I sumbled over this strange behaivour that, for me, is a bug:

Code: Select all

<Window Type="SleekSpace/FrameWindow" Name="Welcome">
   <Property Name="UnifiedPosition" Value="{{0.25,0},{0.25,0}}" />
   <Property Name="UnifiedSize"     Value="{{0.5,0},{0.5,0}}" />
   <Property Name="UnifiedMaxSize"  Value="{{0.8,0},{0.8,0}}" />
   <Property Name="UnifiedMinSize"  Value="{{0.25,0},{0.25,0}}" />
</window>

(not the complete file)

There is a problem with your file because it should be </Window> instead of </window>. your document is not an XML document. It's strange tiny accept it or its a typo in the post.

Pompei2 wrote:This code works perfectly, but as I'm a person that like things to be aligned, I want to write this:

Code: Select all

<Window Type="SleekSpace/FrameWindow" Name="Welcome">
   <Property Name="UnifiedPosition" Value="{{0.25,0},{0.25,0}}" />
   <Property Name="UnifiedSize"     Value="{{0.5 ,0},{0.5 ,0}}" />
   <Property Name="UnifiedMaxSize"  Value="{{0.8 ,0},{0.8 ,0}}" />
   <Property Name="UnifiedMinSize"  Value="{{0.25,0},{0.25,0}}" />
</window>


And I run my program again and woeps ! Strange ... The height of my window is now the minimum (0.25) and I can't change it !! But the width is right and I can change it like intended.

I'd like to know if this is a bug in CEGUI and if yes, will it be fixed for the official release 0.5.0 ?

ah yes, I use TinyXML as parser and didn't try it on an other parser yet (didn't compile any other parser, in fact.)


It's not a bug. The property format is fixed and does not include spaces in the definition.

Re: XML reading bug ?

Posted: Mon Aug 21, 2006 19:37
by Pompei2
Dalfy wrote:
Pompei2 wrote:Hello, I sumbled over this strange behaivour that, for me, is a bug:

Code: Select all

<Window Type="SleekSpace/FrameWindow" Name="Welcome">
   <Property Name="UnifiedPosition" Value="{{0.25,0},{0.25,0}}" />
   <Property Name="UnifiedSize"     Value="{{0.5,0},{0.5,0}}" />
   <Property Name="UnifiedMaxSize"  Value="{{0.8,0},{0.8,0}}" />
   <Property Name="UnifiedMinSize"  Value="{{0.25,0},{0.25,0}}" />
</window>

(not the complete file)

There is a problem with your file because it should be </Window> instead of </window>. your document is not an XML document. It's strange tiny accept it or its a typo in the post.

Yea It's a typo, but i didn't know xml is case sensitive, good to know.

Dalfy wrote:
Pompei2 wrote:This code works perfectly, but as I'm a person that like things to be aligned, I want to write this:

Code: Select all

<Window Type="SleekSpace/FrameWindow" Name="Welcome">
   <Property Name="UnifiedPosition" Value="{{0.25,0},{0.25,0}}" />
   <Property Name="UnifiedSize"     Value="{{0.5 ,0},{0.5 ,0}}" />
   <Property Name="UnifiedMaxSize"  Value="{{0.8 ,0},{0.8 ,0}}" />
   <Property Name="UnifiedMinSize"  Value="{{0.25,0},{0.25,0}}" />
</window>


And I run my program again and woeps ! Strange ... The height of my window is now the minimum (0.25) and I can't change it !! But the width is right and I can change it like intended.

I'd like to know if this is a bug in CEGUI and if yes, will it be fixed for the official release 0.5.0 ?

ah yes, I use TinyXML as parser and didn't try it on an other parser yet (didn't compile any other parser, in fact.)


It's not a bug. The property format is fixed and does not include spaces in the definition.

Oh ok didn't know this too :(
But thank you for your quick reply.

Posted: Fri Sep 22, 2006 10:21
by PapiRauk
Tip: Instead of spaces you could add 0 (zero) causing the pretty fields to line up :wink:

Posted: Fri Sep 22, 2006 20:47
by Pompei2
hehe very good idea, i love it to be all aligned, thank you ! :)
shame on me that i didn't think of it before :oops: