flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [02/10] git commit: [flex-asjs] [refs/heads/develop] - fix databinding if backing var not named after the property
Date Sat, 10 Jan 2015 07:46:08 GMT
fix databinding if backing var not named after the property


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

Branch: refs/heads/develop
Commit: 3f4ed92cbcc71f22797bee3d1863f27bb566519c
Parents: bf1faef
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jan 9 13:49:35 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 9 23:45:57 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/core/ApplicationDataBinding.as         | 2 +-
 .../FlexJSJX/src/org/apache/flex/core/ContainerDataBinding.as  | 6 +++---
 .../js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js     | 2 ++
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f4ed92c/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ApplicationDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ApplicationDataBinding.as
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ApplicationDataBinding.as
index 9a14e0e..27aef17 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ApplicationDataBinding.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ApplicationDataBinding.as
@@ -97,7 +97,7 @@ package org.apache.flex.core
                     binding = bindings[i];
                 if (binding.source is Array)
                 {
-                    if (binding.source[0] in _strand)
+                    if (hasProperty(_strand, binding.source[0]))
                     {
                         if (binding.source.length == 2 && binding.destination.length
== 2)
                         {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f4ed92c/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ContainerDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ContainerDataBinding.as
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ContainerDataBinding.as
index 00a0a35..28e6c59 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ContainerDataBinding.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ContainerDataBinding.as
@@ -98,7 +98,7 @@ package org.apache.flex.core
                     binding = bindings[i];
                 if (binding.source is Array)
                 {
-                    if (binding.source[0] in _strand)
+                    if (hasProperty(_strand, binding.source[0]))
                     {
                         if (binding.source.length == 2 && binding.destination.length
== 2)
                         {
@@ -353,9 +353,9 @@ package org.apache.flex.core
         {
             for (var p:String in deferredBindings)
             {
-                if (_strand[p] != null)
+                if (getProperty(_strand, p) != null)
                 {
-                    var destination:IStrand = _strand[p] as IStrand;
+                    var destination:IStrand = getProperty(_strand, p) as IStrand;
                     destination.addBead(deferredBindings[p]);
                     delete deferredBindings[p];
                 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f4ed92c/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
index de3ef28..d19c4fc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
@@ -67,6 +67,8 @@ org.apache.flex.binding.SimpleBinding.prototype.changeHandler = function()
{
 org.apache.flex.binding.SimpleBinding.prototype.set_strand = function(value) {
   org.apache.flex.binding.SimpleBinding.base(this, 'set_strand', value);
 
+  if (!this.source)
+    return;
 
   this.source.addEventListener(this.eventName,
       goog.bind(this.changeHandler, this));


Mime
View raw message