handle generic constant binding
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/17505db6 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/17505db6 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/17505db6 Branch: refs/heads/develop Commit: 17505db6becdcc32e21e61cb123e29db02d9579b Parents: b1115fe Author: Alex Harui <[email protected]> Authored: Tue Oct 28 09:43:01 2014 -0700 Committer: Alex Harui <[email protected]> Committed: Wed Oct 29 11:15:42 2014 -0700 ---------------------------------------------------------------------- .../src/org/apache/flex/core/ContainerDataBinding.as | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17505db6/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 3758e94..00a0a35 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 @@ -229,7 +229,15 @@ package org.apache.flex.core gb.destinationData = binding.destination; gb.destinationFunction = binding.destFunc; gb.source = binding.source; - setupWatchers(gb, index, watchers.watchers, null); + if (watchers.watchers.length) + setupWatchers(gb, index, watchers.watchers, null); + else + { + // should be a constant expression. + // the value doesn't matter as GenericBinding + // should get the value from the source + gb.valueChanged(null); + } } private function setupWatchers(gb:GenericBinding, index:int, watchers:Array, parentWatcher:WatcherBase):void
