Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 087661809F for ; Fri, 8 May 2015 06:14:37 +0000 (UTC) Received: (qmail 3236 invoked by uid 500); 8 May 2015 06:14:36 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 3158 invoked by uid 500); 8 May 2015 06:14:36 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 2993 invoked by uid 99); 8 May 2015 06:14:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2015 06:14:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 80010E4422; Fri, 8 May 2015 06:14:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Fri, 08 May 2015 06:14:38 -0000 Message-Id: <29dcd1390afb4edaab9bfda53b62669c@git.apache.org> In-Reply-To: <3a349adad2ce455a903cc9b5ff30a99f@git.apache.org> References: <3a349adad2ce455a903cc9b5ff30a99f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/6] git commit: [flex-asjs] [refs/heads/develop] - sync up with container databinding sync up with container databinding Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5729bbe9 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5729bbe9 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5729bbe9 Branch: refs/heads/develop Commit: 5729bbe99ac9de0c286575262fae277c57ff4a4d Parents: 32dd968 Author: Alex Harui Authored: Tue May 5 11:54:52 2015 -0700 Committer: Alex Harui Committed: Thu May 7 17:36:08 2015 -0700 ---------------------------------------------------------------------- .../apache/flex/binding/ViewBaseDataBinding.as | 46 ++++++++++++++++---- 1 file changed, 37 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5729bbe9/frameworks/projects/Binding/as/src/org/apache/flex/binding/ViewBaseDataBinding.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Binding/as/src/org/apache/flex/binding/ViewBaseDataBinding.as b/frameworks/projects/Binding/as/src/org/apache/flex/binding/ViewBaseDataBinding.as index 960b2b5..88c580a 100644 --- a/frameworks/projects/Binding/as/src/org/apache/flex/binding/ViewBaseDataBinding.as +++ b/frameworks/projects/Binding/as/src/org/apache/flex/binding/ViewBaseDataBinding.as @@ -79,6 +79,7 @@ package org.apache.flex.binding if (!("_bindings" in _strand)) return; var bindingData:Array = _strand["_bindings"]; + var destObject:Object; var n:int = bindingData[0]; var bindings:Array = []; var i:int; @@ -113,13 +114,22 @@ package org.apache.flex.binding sb.sourceID = binding.source[0]; sb.sourcePropertyName = binding.source[1]; sb.setDocument(_strand); - destination = _strand[binding.destination[0]] as IStrand; + destObject = _strand[binding.destination[0]]; + destination = destObject as IStrand; if (destination) destination.addBead(sb); else { - deferredBindings[binding.destination[0]] = sb; - IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler); + if (destObject) + { + sb.destination = destObject; + _strand.addBead(sb); + } + else + { + deferredBindings[binding.destination[0]] = sb; + IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler); + } } } else if (fieldWatcher.eventNames == null) @@ -129,13 +139,22 @@ package org.apache.flex.binding cb.sourceID = binding.source[0]; cb.sourcePropertyName = binding.source[1]; cb.setDocument(_strand); - destination = _strand[binding.destination[0]] as IStrand; + destObject = _strand[binding.destination[0]]; + destination = destObject as IStrand; if (destination) destination.addBead(cb); else { - deferredBindings[binding.destination[0]] = cb; - IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler); + if (destObject) + { + sb.destination = destObject; + _strand.addBead(sb); + } + else + { + deferredBindings[binding.destination[0]] = sb; + IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler); + } } } } @@ -151,13 +170,22 @@ package org.apache.flex.binding sb.eventName = fieldWatcher.eventNames as String; sb.sourcePropertyName = binding.source; sb.setDocument(_strand); - destination = _strand[binding.destination[0]] as IStrand; + destObject = _strand[binding.destination[0]]; + destination = destObject as IStrand; if (destination) destination.addBead(sb); else { - deferredBindings[binding.destination[0]] = sb; - IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler); + if (destObject) + { + sb.destination = destObject; + _strand.addBead(sb); + } + else + { + deferredBindings[binding.destination[0]] = sb; + IEventDispatcher(_strand).addEventListener("valueChange", deferredBindingsHandler); + } } } }