Main Site Documentation

Failure to load correctly


#1

I just tried to load an existing XML file to the Glide editor and a couple of the elements where reset to defaults.

This is the xml I was trying to load.


<Glide Version="1.0.6">
  <Window Name="densityWindow" Width="480" Height="272" BackColor="F0F0A0">
    <Button Name="cancelButton" X="392" Y="222" Width="80" Height="42" Alpha="255" Text="Cancel" Font="4" FontColor="000000" DisabledFontColor="808080" TintColor="000000" TintAmount="0"/>
    <Button Name="acceptButton" X="8" Y="222" Width="80" Height="42" Alpha="255" Text="Accept" Font="4" FontColor="000000" DisabledFontColor="808080" TintColor="000000" TintAmount="0"/>
    <TextBlock Name="instance96290" X="220" Y="30" Width="100" Height="32" Alpha="255" Text="Density (15C)" TextAlign="Left" TextVerticalAlign="Middle" Font="4" FontColor="0" BackColor="000000" ShowBackColor="False"/>
    <TextBox Name="densityText" X="320" Y="30" Width="80" Height="32" Alpha="255" Text="0.0" TextAlign="Right" Font="4" FontColor="000000"/>
    <TextBlock Name="instance102286" X="0" Y="0" Width="480" Height="24" Alpha="255" Text="Fuel Density Calculations" TextAlign="Center" TextVerticalAlign="Middle" Font="4" FontColor="0" BackColor="A0A0A0" ShowBackColor="True"/>
    <TextBlock Name="instance110447" X="140" Y="70" Width="100" Height="32" Alpha="255" Text="Temp Range" TextAlign="Center" TextVerticalAlign="Middle" Font="3" FontColor="0" BackColor="000000" ShowBackColor="False"/>
    <TextBox Name="tempRange" X="150" Y="100" Width="80" Height="32" Alpha="255" Text="0.0" TextAlign="Right" Font="4" FontColor="000000"/>
    <TextBlock Name="instance112148" X="240" Y="70" Width="100" Height="32" Alpha="255" Text="Temp Offset" TextAlign="Center" TextVerticalAlign="Middle" Font="3" FontColor="0" BackColor="000000" ShowBackColor="False"/>
    <TextBox Name="tempOffset" X="250" Y="100" Width="80" Height="32" Alpha="255" Text="0.0" TextAlign="Right" Font="4" FontColor="000000"/>
    <CheckBox Name="applyDensity" X="405" Y="29" Width="32" Height="32" Alpha="255" Checked="False"/>
    <TextBlock Name="instance51805" X="20" Y="30" Width="100" Height="32" Alpha="255" Text="Temp Coeff Per deg C" TextAlign="Left" TextVerticalAlign="Middle" Font="2" FontColor="0" BackColor="000000" ShowBackColor="False"/>
    <TextBox Name="tempCoeffText" X="119" Y="29" Width="100" Height="32" Alpha="255" Text="0.000000" TextAlign="Right" Font="4" FontColor="000000"/>
  </Window>
</Glide>

instance51805 and tempCoeffText get reset. See the attached image from the editor window.

The XML was originally created with the Glide online editor.

It seems to be related to the data being after the CheckBox entry. If I move it so that the check box is the last entry it works.

It also does it with this simple form so it is repeatable.


<Glide Version="1.0.6">
  <Window Name="instance115" Width="320" Height="240" BackColor="FFFFFF">
    <CheckBox Name="test" X="117" Y="66" Width="32" Height="32" Alpha="255" Checked="False"/>
    <TextBlock Name="testEdit" X="89" Y="28" Width="100" Height="32" Alpha="255" Text="TextBlock" TextAlign="Left" TextVerticalAlign="Middle" Font="4" FontColor="0" BackColor="000000" ShowBackColor="False"/>
  </Window>
</Glide>

Also note that because of this, you can’t have more than 1 checkbox or it will mess up all those below the first one. This fails too.


<Glide Version="1.0.6">
  <Window Name="instance115" Width="320" Height="240" BackColor="FFFFFF">
    <TextBlock Name="testLabel" X="90" Y="29" Width="100" Height="32" Alpha="255" Text="TextBlock" TextAlign="Left" TextVerticalAlign="Top" Font="4" FontColor="0" BackColor="000000" ShowBackColor="False"/>
    <CheckBox Name="check1" X="117" Y="66" Width="32" Height="32" Alpha="255" Checked="False"/>
    <CheckBox Name="check2" X="116" Y="119" Width="32" Height="32" Alpha="255" Checked="False"/>
  </Window>
</Glide>


#2

when was the last time you pulled glide from codeplex?


#3

Hi Jeff,

It’s not the GLIDE code that’s wrong. It’s the GLIDE ONLINE editor won’t load the XML correctly after the first occurrence of a CheckBox.

I have the latest code on my machine.

Try copying and pasting my code in to the ONLINE editor and you will see what happens.


#4

Try now https://www.ghielectronics.com/glide/designer


#5

It’s working now.

Cheers Josh.


#6

@ Josh.

If you are listening, could you look at the issue with TextBlock?

When you load an XML and the vertical alignment is Middle or Bottom, it does not get applied and all of them are shown as Top until you click on the property and press enter.


#7

I’m not able to see this issue. What XML are you using?


#8

Typical. I can’t get it to do it now.

If I find the file that causes the issue, I’ll post it here.