aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/CompilerServices
diff options
context:
space:
mode:
Diffstat (limited to 'src/CompilerServices')
-rw-r--r--src/CompilerServices/CompilerServices.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs
index c72137df..e7395383 100644
--- a/src/CompilerServices/CompilerServices.cs
+++ b/src/CompilerServices/CompilerServices.cs
@@ -29,6 +29,8 @@ namespace go
}
public bool FindMember(string _memberName)
{
+ if (Instance == null)
+ return false;
Type t = Instance.GetType ();
Member = t.GetMember (_memberName,BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance).FirstOrDefault ();
@@ -79,7 +81,7 @@ namespace go
//if binding exp = '{}' => binding is done on datasource
if (string.IsNullOrEmpty (Expression)) {
- Target = new MemberReference (Source.Instance);
+ Target = new MemberReference ((Source.Instance as GraphicObject).DataSource);
return true;
}
@@ -101,7 +103,7 @@ namespace go
if (tmp == null)
return false;
if (bindingExp [ptr] == "..")
- tmp = tmp.Parent as GraphicObject;
+ tmp = tmp.Parent as ILayoutable;
else if (bindingExp [ptr] == ".") {
if (ptr > 0)
throw new Exception ("Syntax error in binding, './' may only appear in first position");
@@ -111,6 +113,9 @@ namespace go
ptr++;
}
+ if (tmp == null)
+ return false;
+
string[] bindTrg = bindingExp [ptr].Split ('.');
if (bindTrg.Length == 1)