aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
-rw-r--r--Tests/GOLIBTest_4.cs15
-rwxr-xr-xTests/Interfaces/test4.goml12
-rw-r--r--src/CompilerServices/CompilerServices.cs6
3 files changed, 18 insertions, 15 deletions
diff --git a/Tests/GOLIBTest_4.cs b/Tests/GOLIBTest_4.cs
index 5b421100..3fb79fff 100644
--- a/Tests/GOLIBTest_4.cs
+++ b/Tests/GOLIBTest_4.cs
@@ -88,7 +88,7 @@ namespace test
//c2.VerticalAlignment = VerticalAlignment.Top;
c.Background.AdjustAlpha (0.5);
labMousePos = c.FindByName ("labMouse") as Label;
- pb = c.FindByName("pbBar") as ProgressBar;
+ //pb = c.FindByName("pbBar") as ProgressBar;
pb2 = c.FindByName("pbBar2") as ProgressBar;
labPb = c.FindByName ("labPb") as Label;
labF = c.FindByName ("labFocus") as Label;
@@ -135,8 +135,8 @@ namespace test
}
);
i++;
- if (i > 250)
- break;
+// if (i > 150)
+// break;
}
ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));
}
@@ -171,11 +171,10 @@ namespace test
}
frameCpt++;
- if (pb.Value == pb.Maximum)
- pb.Value = 0;
- pb.Value++;
- pb2.Value = pb.Value;
- //labPb.Text = pb.Value.ToString ();
+ if (pb2.Value == pb2.Maximum)
+ pb2.Value = 0;
+ pb2.Value++;
+
if (FocusedWidget==null)
labF.Text = "- none -";
else
diff --git a/Tests/Interfaces/test4.goml b/Tests/Interfaces/test4.goml
index c468aef2..ec4251fe 100755
--- a/Tests/Interfaces/test4.goml
+++ b/Tests/Interfaces/test4.goml
@@ -48,15 +48,15 @@
<!-- <ListBox Data="{TestList}"></ListBox>-->
<HorizontalStack Name="hsPbar" Margin="5">
<ProgressBar Name="pbBar"
- Width="100" Height="20"
+ Width="200" Height="20"
Minimum="0"
Maximum="200"
- Value="50"
+ Value="{fps}"
Foreground="BlueCrayola" Background="DarkGray"
BorderWidth="2" BorderColor="White"/>
- <Label Name="labPb"
+<!-- <Label Name="labPb"
Width="30"
- TextAlignment="RightCenter"/>
+ TextAlignment="RightCenter"/>-->
</HorizontalStack>
<HorizontalStack Name="hsFocus">
<Label Text="Focused:"/>
@@ -79,7 +79,7 @@
Text="editable text"/>
<GroupBox Title="Group Box" Width="300" Height="100"
BorderColor="White" BorderWidth="2" Margin="3">
- <Label Name="labValue" FontSize="14" Text="000" TextAlignment="Center"/>
+ <Label Name="labValue" FontSize="14" Text="{../../slider.Value}" TextAlignment="Center"/>
</GroupBox>
<Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />
<GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>
@@ -139,6 +139,8 @@
<VerticalStack Name="colors" VerticalAlignment="Top" Margin="1">
<ProgressBar Name="pbBar2" Width="100" Height="20" Value="50"
BorderWidth="2" BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>
+ <ProgressBar Width="100" Height="20" Value="{fps}" BorderWidth="2"
+ BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>
</VerticalStack>
</Scroller>
<Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs
index b2f2e14c..bedb554f 100644
--- a/src/CompilerServices/CompilerServices.cs
+++ b/src/CompilerServices/CompilerServices.cs
@@ -199,8 +199,10 @@ namespace go
if (miDst.MemberType == MemberTypes.Property) {
PropertyInfo piDst = miDst as PropertyInfo;
//TODO: handle other dest type conversions
- if (piDst.PropertyType == typeof(string))
- srcVal = srcVal.ToString ();
+ if (piDst.PropertyType == typeof(string)){
+ if (srcVal != null)
+ srcVal = srcVal.ToString ();
+ }
piDst.GetSetMethod ().Invoke (binding.Source, new object[] { srcVal });
} else if (miDst.MemberType == MemberTypes.Field) {
FieldInfo fiDst = miDst as FieldInfo;