You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/01/23 21:24:19 UTC

[09/14] git commit: [flex-asjs] [refs/heads/develop] - remove lint error

remove lint error


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

Branch: refs/heads/develop
Commit: d10475a21cce569a9db236ff235cf613a7828008
Parents: 74a47a8
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jan 23 12:22:39 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:05 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/binding/ChainBinding.js | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d10475a2/frameworks/js/FlexJS/src/org/apache/flex/binding/ChainBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/ChainBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/ChainBinding.js
index 002555f..7e2806f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/ChainBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/ChainBinding.js
@@ -122,7 +122,14 @@ org.apache.flex.binding.ChainBinding.prototype.evaluateSourceChain = function()
 /**
  */
 org.apache.flex.binding.ChainBinding.prototype.applyValue = function() {
-  var destinationName;
+  var destinationName, n, obj, self;
+  function handler(event) {
+    if (event.propertyName != propName)
+      return;
+    if (event.oldValue != null)
+      event.oldValue.removeEventListener('valueChange', handler);
+    self.applyValue();
+  }
   if (typeof(this.destination) === 'string') {
     destinationName = this.destination;
     if (typeof(this.document['set_' + destinationName]) === 'function')
@@ -132,9 +139,9 @@ org.apache.flex.binding.ChainBinding.prototype.applyValue = function() {
     return;
   }
 
-  var n = this.destination.length;
-  var obj = this.document;
-  var self = this;
+  n = this.destination.length;
+  obj = this.document;
+  self = this;
   for (var i = 0; i < n - 1; i++) {
     var propName = this.destination[i];
     var propObj;
@@ -142,13 +149,6 @@ org.apache.flex.binding.ChainBinding.prototype.applyValue = function() {
       propObj = obj['get_' + propName]();
     else
       propObj = obj[propName];
-    function handler(event) {
-      if (event.propertyName != propName)
-        return;
-      if (event.oldValue != null)
-        event.oldValue.removeEventListener('valueChange', handler);
-      self.applyValue();
-    }
     if (propObj == null) {
       obj.addEventListener('valueChange', handler);
       return;