aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/IML/NodeAddress.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-15 14:58:36 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-15 14:58:36 +0100
commitc1b29a565bdbf37fd88d268588710ce8f4f84d5b (patch)
tree37ec254f01bb8d2bad971c137fa787ca76a194d1 /src/IML/NodeAddress.cs
parent0efa7446134489edd303b349ae1220f1c4228e9a (diff)
CrowIDE WIP, context commands, tooltips, PointIsIn(ref point), configuration no longer static.
also: - remove default null value for datasource - dschange sender changed in group and privateContainer - try closing menuItem, should debug - Contains search also template in TemplatedContainer - change in nodeAddress: expresion starting with '/' means current node - MouseEventArgs CTOR with one source button - RemoveWidget trigger check HoverWidget - Orientation binding in Menu template
Diffstat (limited to 'src/IML/NodeAddress.cs')
-rw-r--r--src/IML/NodeAddress.cs23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/IML/NodeAddress.cs b/src/IML/NodeAddress.cs
index b9f8b902..450a9d2d 100644
--- a/src/IML/NodeAddress.cs
+++ b/src/IML/NodeAddress.cs
@@ -54,18 +54,21 @@ namespace Crow.IML
if (splitedExp.Length < 2)//dataSource binding
return null;
- if (string.IsNullOrEmpty (splitedExp [0]) || splitedExp [0] == ".") {//search template root
- ptr--;
- while (ptr >= 0) {
- if (typeof(TemplatedControl).IsAssignableFrom (this [ptr].CrowType))
- break;
+ if (!string.IsNullOrEmpty (splitedExp [0])) {//else bind on current node
+ //return new NodeAddress (this.Take(ptr+1).ToArray());
+ if (splitedExp [0] == ".") {//search template root
ptr--;
+ while (ptr >= 0) {
+ if (typeof(TemplatedControl).IsAssignableFrom (this [ptr].CrowType))
+ break;
+ ptr--;
+ }
+ } else if (splitedExp [0] == "..") { //search starting at current node
+ int levelUp = splitedExp.Length - 1;
+ if (levelUp > ptr + 1)
+ throw new Exception ("Binding error: try to bind outside IML source");
+ ptr -= levelUp;
}
- } else if (splitedExp [0] == "..") { //search starting at current node
- int levelUp = splitedExp.Length - 1;
- if (levelUp > ptr + 1)
- throw new Exception ("Binding error: try to bind outside IML source");
- ptr -= levelUp;
}
expression = splitedExp [splitedExp.Length - 1];
//TODO:change Template special address identified with Nodecount = 0 to something not using array count to 0,