flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [22/50] git commit: [flex-asjs] [refs/heads/feature/mdl] - FLEX-35249 - Add to ContainerDataBinding missing constant binding. - Move makeConstantBinding method to base class
Date Fri, 27 Jan 2017 22:14:03 GMT
FLEX-35249 - Add to ContainerDataBinding missing constant binding.
- Move makeConstantBinding method to base class


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/13de3418
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/13de3418
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/13de3418

Branch: refs/heads/feature/mdl
Commit: 13de34184dc278a339ab0d16f1a93580a36be80e
Parents: 7b6b3e6
Author: piotrz <piotrz@apache.org>
Authored: Mon Jan 23 22:01:20 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Mon Jan 23 22:01:20 2017 +0100

----------------------------------------------------------------------
 .../org/apache/flex/binding/ContainerDataBinding.as  |  6 +++++-
 .../flex/org/apache/flex/binding/DataBindingBase.as  | 15 +++++++++++++++
 .../apache/flex/binding/ItemRendererDataBinding.as   | 14 --------------
 .../flex/org/apache/flex/binding/ViewDataBinding.as  | 14 --------------
 4 files changed, 20 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/13de3418/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
index bb05f91..40a0ee2 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
@@ -134,7 +134,11 @@ package org.apache.flex.binding
                             chb.setDocument(_strand);
                             _strand.addBead(chb);
                         }
-                    }
+                     }
+                     else
+                     {
+                        makeConstantBinding(binding);
+                     }
                 }
                 else if (binding.source is String && binding.destination is Array)
                 {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/13de3418/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/DataBindingBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/DataBindingBase.as
b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/DataBindingBase.as
index af73d86..c649294 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/DataBindingBase.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/DataBindingBase.as
@@ -253,6 +253,21 @@ package org.apache.flex.binding
             return { watchers: watchers, watcherMap: watcherMap };
         }
 
+        protected function makeConstantBinding(binding:Object):void
+        {
+            var cb:ConstantBinding = new ConstantBinding();
+            cb.destinationPropertyName = binding.destination[1];
+            if (binding.source is String) {
+                cb.sourcePropertyName = binding.source;
+            } else {
+                cb.sourceID = binding.source[0];
+                cb.sourcePropertyName = binding.source[1];
+            }
+            cb.setDocument(_strand);
+
+            prepareCreatedBinding(cb as IBinding, binding);
+        }
+
         private function deferredBindingsHandler(event:Event):void
         {
             for (var p:String in deferredBindings)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/13de3418/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererDataBinding.as
b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererDataBinding.as
index 53459c8..2d7dfe6 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ItemRendererDataBinding.as
@@ -157,20 +157,6 @@ package org.apache.flex.binding
             }
         }
 
-        private function makeConstantBinding(binding:Object):void{
-            var cb:ConstantBinding = new ConstantBinding();
-            cb.destinationPropertyName = binding.destination[1];
-            if (binding.source is String) {
-                cb.sourcePropertyName = binding.source;
-            } else {
-                cb.sourceID = binding.source[0];
-                cb.sourcePropertyName = binding.source[1];
-            }
-            cb.setDocument(_strand);
-
-            prepareCreatedBinding(cb as IBinding, binding);
-        }
-
         private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
         {
             var gb:GenericBinding = new GenericBinding();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/13de3418/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
index d82667e..077b350 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
@@ -164,20 +164,6 @@ package org.apache.flex.binding
             }
         }
 
-        private function makeConstantBinding(binding:Object):void{
-            var cb:ConstantBinding = new ConstantBinding();
-            cb.destinationPropertyName = binding.destination[1];
-            if (binding.source is String) {
-                cb.sourcePropertyName = binding.source;
-            } else {
-                cb.sourceID = binding.source[0];
-                cb.sourcePropertyName = binding.source[1];
-            }
-            cb.setDocument(_strand);
-
-            prepareCreatedBinding(cb as IBinding, binding);
-        }
-
         private function makeGenericBinding(binding:Object, index:int, watchers:Object):void
         {
             var gb:GenericBinding = new GenericBinding();


Mime
View raw message