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/05/01 22:05:51 UTC

git commit: [flex-falcon] [refs/heads/develop] - Using change events from the scope doesn't make sense to me if you have definitions from the class. If the scope had a property of the same name as the class, then the binding system would end up watching

Repository: flex-falcon
Updated Branches:
  refs/heads/develop 6e555e165 -> 91463d042


Using change events from the scope doesn't make sense to me if you have definitions from the class.  If the scope had a property of the same name as the class, then the binding system would end up watching events from both definitions, which broke the SimpleBinding optimizations which only expects one change event


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

Branch: refs/heads/develop
Commit: 91463d042470f487126c1ff88971eb71f91e452b
Parents: 6e555e1
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 1 13:05:42 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 1 13:05:42 2015 -0700

----------------------------------------------------------------------
 .../internal/codegen/databinding/WatcherInfoBase.java | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/91463d04/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherInfoBase.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherInfoBase.java b/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherInfoBase.java
index 53bbb8c..ae39b0a 100644
--- a/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherInfoBase.java
+++ b/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherInfoBase.java
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.codegen.databinding;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -202,14 +203,12 @@ public class WatcherInfoBase
         
         assert ! (def instanceof IConstantDefinition);  // don't call with constants, we don't know what to do with them
     
-        Collection<IDefinition> defs = SemanticUtils.getPropertiesByNameForMemberAccess(((IdentifierNode)sourceNode).getASScope(), 
-                                def.getBaseName(), project);
-        if (defs.size() == 0)
-            defs.add(def);
+        Collection<IDefinition> defs;
         
         IDefinition parent = def.getParent();
         if (parent instanceof IClassDefinition)
         {
+            defs = new ArrayList<IDefinition>();
             while (parent != null)
             {
                 Collection<IDefinition> moredefs = SemanticUtils.getPropertiesByNameForMemberAccess(
@@ -222,6 +221,13 @@ public class WatcherInfoBase
                 parent = ((IClassDefinition)parent).resolveBaseClass(project);
             }
         }
+        else
+        {
+            defs = SemanticUtils.getPropertiesByNameForMemberAccess(((IdentifierNode)sourceNode).getASScope(), 
+                    def.getBaseName(), project);
+            if (defs.size() == 0)
+                defs.add(def);
+        }
         
         boolean wasBindable = false;
         for (IDefinition d : defs)