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/13 19:11:10 UTC

[01/17] git commit: [flex-asjs] [refs/heads/develop] - animate x instead of right because move effect sets x/left and locks things down

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 90278a176 -> f0be94029


animate x instead of right because move effect sets x/left and locks things down


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

Branch: refs/heads/develop
Commit: c6a8107f8dbdcd564416847c69ad005b560f3427
Parents: 90278a1
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 09:59:33 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 09:59:33 2015 -0800

----------------------------------------------------------------------
 examples/FlexJSStore/src/ProductsView.mxml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c6a8107f/examples/FlexJSStore/src/ProductsView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/ProductsView.mxml b/examples/FlexJSStore/src/ProductsView.mxml
index 636413e..8f9ec9a 100755
--- a/examples/FlexJSStore/src/ProductsView.mxml
+++ b/examples/FlexJSStore/src/ProductsView.mxml
@@ -71,7 +71,6 @@ limitations under the License.
     </fx:Script>
     <basic:beads>
         <basic:ContainerDataBinding />
-        <basic:LayoutChangeNotifier watchedProperty="{catalogPanelPosition.right}" initialValue="17" />
     </basic:beads>
     <basic:Container 
         className="colorPanel"
@@ -102,14 +101,11 @@ limitations under the License.
     </basic:Container>
         
     <productsView:ProductCatalogPanel id="catalogPanel" y="4" width="685" height="540"
+                                      x.showFilter="288" x.showCart="0"
         catalog="{catalog}"
         compare="addToCompare(event.product)"
         purchase="addToCart(event.product)"
         cartCount="{cartPanel.numProducts}">
-        <productsView:style>
-            <basic:BindableCSSStyles id="catalogPanelPosition" right.showFilter="17"
-                                  right.showCart="285" />
-        </productsView:style>
     </productsView:ProductCatalogPanel>
     
     <basic:states>


[06/17] git commit: [flex-asjs] [refs/heads/develop] - ints may need to be initialized by the cross-compiler

Posted by ah...@apache.org.
ints may need to be initialized by the cross-compiler


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

Branch: refs/heads/develop
Commit: f8237c4cc71662c0fc3f8198079ab300cdaddfd0
Parents: ff79b03
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:04:34 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:04:34 2015 -0800

----------------------------------------------------------------------
 examples/FlexJSStore/src/productsView/ProductList.mxml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f8237c4c/examples/FlexJSStore/src/productsView/ProductList.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductList.mxml b/examples/FlexJSStore/src/productsView/ProductList.mxml
index 8f44786..e99397d 100755
--- a/examples/FlexJSStore/src/productsView/ProductList.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductList.mxml
@@ -50,7 +50,7 @@ limitations under the License.
         public var newItemStartX:int;
         public var newItemStartY:int;
         [Bindable]
-        public var maxItems:int;
+        public var maxItems:int = 0;
         public var showQuantity:Boolean;
         
         private var playingEffects:Object = new Object();


[13/17] git commit: [flex-asjs] [refs/heads/develop] - resize properly in certain scenarios

Posted by ah...@apache.org.
resize properly in certain scenarios


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

Branch: refs/heads/develop
Commit: 70d6ee2f970c56d586b32409d5e3e4750ec0db9b
Parents: 1f3429a
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:08:37 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:08:37 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/TextFieldViewBase.as     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70d6ee2f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
index 839420b..2378b78 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/TextFieldViewBase.as
@@ -104,7 +104,14 @@ package org.apache.flex.html.beads
             
             autoHeight = ilc.isHeightSizedToContent();
             autoWidth = ilc.isWidthSizedToContent();
-
+            if (!autoWidth && !isNaN(ilc.explicitWidth))
+            {
+                widthChangeHandler(null);
+            }
+            if (!autoHeight && !isNaN(ilc.explicitHeight))
+            {
+                heightChangeHandler(null);
+            }
 		}
 		
         /**


[11/17] git commit: [flex-asjs] [refs/heads/develop] - no change event unless user interacts

Posted by ah...@apache.org.
no change event unless user interacts


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

Branch: refs/heads/develop
Commit: a3e7225cdaedc21dc5e9a524a284c1e6414cce65
Parents: 9c098b7
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:07:02 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:07:02 2015 -0800

----------------------------------------------------------------------
 .../projects/FlexJSUI/src/org/apache/flex/html/TextInput.as   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3e7225c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/TextInput.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/TextInput.as
index 8b937e7..dd1fc50 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/TextInput.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/TextInput.as
@@ -75,7 +75,9 @@ package org.apache.flex.html
          */
 		public function set text(value:String):void
 		{
+            inSetter = true;
 			ITextModel(model).text = value;
+            inSetter = false;
 		}
 		
         /**
@@ -99,6 +101,8 @@ package org.apache.flex.html
 			ITextModel(model).html = value;
 		}
 
+        private var inSetter:Boolean;
+        
 		/**
 		 * @dispatch change event in response to a textChange event
 		 *
@@ -109,7 +113,8 @@ package org.apache.flex.html
 		 */
 		public function textChangeHandler(event:Event):void
 		{
-            dispatchEvent(new Event(Event.CHANGE));
+            if (!inSetter)
+                dispatchEvent(new Event(Event.CHANGE));
 		}
 	}
 }


[15/17] git commit: [flex-asjs] [refs/heads/develop] - handle 'this' in databinding expressions'

Posted by ah...@apache.org.
handle 'this' in databinding expressions'


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

Branch: refs/heads/develop
Commit: 135db98c4d16a8728a89b18945b38c3e0a82cdc5
Parents: f9d8ac7
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:09:38 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:09:38 2015 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/135db98c/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js
index 6955b92..a543182 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/DataBindingBase.js
@@ -56,6 +56,9 @@ org.apache.flex.core.DataBindingBase.prototype.hasProperty =
  */
 org.apache.flex.core.DataBindingBase.prototype.getProperty =
     function(obj, propName) {
+  if (propName == 'this')
+    return obj;
+
   if (typeof obj['get_' + propName] === 'function') {
     return obj['get_' + propName]();
   }


[07/17] git commit: [flex-asjs] [refs/heads/develop] - make list items look nicer

Posted by ah...@apache.org.
make list items look nicer


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

Branch: refs/heads/develop
Commit: 38a59eb38535075b2cdc784adc1a0eff1ddb635f
Parents: f8237c4
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:05:18 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:05:18 2015 -0800

----------------------------------------------------------------------
 .../FlexJSStore/src/productsView/ProductListItem.mxml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/38a59eb3/examples/FlexJSStore/src/productsView/ProductListItem.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductListItem.mxml b/examples/FlexJSStore/src/productsView/ProductListItem.mxml
index b4fe57d..a7b77bf 100755
--- a/examples/FlexJSStore/src/productsView/ProductListItem.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductListItem.mxml
@@ -21,7 +21,7 @@ limitations under the License.
                     xmlns:basic="library://ns.apache.org/flexjs/basic" 
                     xmlns:mx="library://ns.adobe.com/flex/mx" 
     className="listItem" 
-    height="{ProductListItem.HEIGHT}" implements="org.apache.flex.core.IItemRenderer">
+    height="{HEIGHT}" implements="org.apache.flex.core.IItemRenderer">
     <!--automationName="{product.name}">-->
 
     <fx:Metadata>
@@ -101,23 +101,23 @@ limitations under the License.
     </basic:beads>
         
     <basic:ImageButton id="removeButton" backgroundImage="assets/trashcan.png"
-        width="14" height="14" 
+        width="14" height="14" y="5"
         click="removeItem()">
         <basic:beads>
             <basic:ToolTipBead toolTip="Remove from cart" />
         </basic:beads>
     </basic:ImageButton>
     
-    <basic:Image id="productImage" x="14" width="12" height="12" source="{product.image}"/>
+    <basic:Image id="productImage" x="16" y="6" width="12" height="12" source="{product.image}"/>
 
-    <basic:Label id="productName" x="26" width="100" text="{product.name}"/>
+    <basic:Label id="productName" x="30" width="100" y="4" text="{product.name}"/>
 
-    <basic:Label id="productPrice" width="60"
+    <basic:Label id="productPrice" width="60" y="4"
         text="{cf.format(product.price)}" style="textAlign:right;right:0"
                                 style.showQuantity="textAlign:right;right:25"/>
         
-    <basic:TextInput id="qty" width="25" text="{product.qty}" includeIn="showQuantity"
-                  style="textAlign:right;right:0" change="qtyChange()" >
+    <basic:TextInput id="qty" width="25" y="3" text="{product.qty}" includeIn="showQuantity"
+                  style="textAlign:right;right:0;marginTop:0" change="qtyChange()" >
         <basic:beads>
             <basic:NumericOnlyTextInputBead maxChars="3" />
         </basic:beads>


[17/17] git commit: [flex-asjs] [refs/heads/develop] - don't get fooled by % sizing

Posted by ah...@apache.org.
don't get fooled by % sizing


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

Branch: refs/heads/develop
Commit: f0be94029a03a3efcd889a3a3a444566394e1d89
Parents: 05117d5
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:10:32 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:10:32 2015 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f0be9402/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index dfb2323..3e92c17 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -446,7 +446,10 @@ org.apache.flex.core.UIBase.prototype.set_width = function(pixels) {
 org.apache.flex.core.UIBase.prototype.get_width = function() {
   var pixels;
   var strpixels = this.positioner.style.width;
-  pixels = parseFloat(strpixels);
+  if (strpixels !== null && strpixels.indexOf('%') != -1)
+    pixels = NaN;
+  else
+    pixels = parseFloat(strpixels);
   if (isNaN(pixels)) {
     pixels = this.positioner.offsetWidth;
     if (pixels === 0 && this.positioner.scrollWidth !== 0) {
@@ -516,7 +519,10 @@ org.apache.flex.core.UIBase.prototype.set_height = function(pixels) {
 org.apache.flex.core.UIBase.prototype.get_height = function() {
   var pixels;
   var strpixels = this.positioner.style.height;
-  pixels = parseFloat(strpixels);
+  if (strpixels !== null && strpixels.indexOf('%') != -1)
+    pixels = NaN;
+  else
+    pixels = parseFloat(strpixels);
   if (isNaN(pixels)) {
     pixels = this.positioner.offsetHeight;
     if (pixels === 0 && this.positioner.scrollHeight !== 0) {


[05/17] git commit: [flex-asjs] [refs/heads/develop] - needs to be in databinding chain

Posted by ah...@apache.org.
needs to be in databinding chain


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

Branch: refs/heads/develop
Commit: ff79b03cc5b5fa13b87c377bba1b87de987e3082
Parents: a3e7664
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:03:54 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:03:54 2015 -0800

----------------------------------------------------------------------
 .../src/productsView/ProductCatalogPanelTitleBarView.mxml           | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ff79b03c/examples/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml b/examples/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
index 6c6de2b..004dc1c 100755
--- a/examples/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductCatalogPanelTitleBarView.mxml
@@ -38,6 +38,7 @@ limitations under the License.
     </fx:Script>
     <basic:beads>
         <basic:MXMLBeadViewBaseDataBinding />
+        <basic:ParentDocumentBead id="pdb" />
         <basic:LayoutChangeNotifier watchedProperty="{titleLabel.height}" />
     </basic:beads>
     <basic:Label id="titleLabel" text="{ITitleBarModel(model).title}" 


[03/17] git commit: [flex-asjs] [refs/heads/develop] - use revised OneFlexibleChildVerticalLayout

Posted by ah...@apache.org.
use revised OneFlexibleChildVerticalLayout


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

Branch: refs/heads/develop
Commit: add4e925a249cc7804a196987b36852ec4f5c48e
Parents: 7fa32ae
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:02:09 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:02:09 2015 -0800

----------------------------------------------------------------------
 .../src/productsView/ProductCart.mxml           | 21 +++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/add4e925/examples/FlexJSStore/src/productsView/ProductCart.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductCart.mxml b/examples/FlexJSStore/src/productsView/ProductCart.mxml
index 00459f3..40555d9 100755
--- a/examples/FlexJSStore/src/productsView/ProductCart.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductCart.mxml
@@ -31,7 +31,7 @@ limitations under the License.
     </basic:style>
     <basic:beads>
         <basic:ContainerDataBinding />
-        <basic:OneFlexibleChildVerticalLayout />
+        <basic:OneFlexibleChildVerticalLayout id="flexLayout" flexibleChild="{productList}" />
     </basic:beads>
     <fx:Script>
         <![CDATA[
@@ -58,7 +58,8 @@ limitations under the License.
                     //fall through into the same logic as dup          
                 case ProductListEvent.DUPLICATE_PRODUCT:
                     event.product.qty++;
-                    total += event.product.price;
+                    //total += event.product.price;
+                    total = total + event.product.price;
                     numProducts++;
                     break;            
                 case ProductListEvent.PRODUCT_QTY_CHANGE:
@@ -69,8 +70,10 @@ limitations under the License.
                     for (var i:int=0; i < items.length; i++)
                     {
                         var product:Product = items[i].product;
-                        total += product.qty * product.price;
-                        numProducts += product.qty;
+                        //total += product.qty * product.price;
+                        //numProducts += product.qty;
+                        total = total + product.qty * product.price;
+                        numProducts = numProducts + product.qty;
                     }       
                     break;
                 default:
@@ -86,7 +89,7 @@ limitations under the License.
     
     <basic:Label width="100%" text="Your Shopping Cart" className="sectionHeader"/>
         
-    <productsView:ProductList id="productList" height="100%" width="100%"
+    <productsView:ProductList id="productList" width="100%"
         newItemStartX="-100" newItemStartY="-100" 
         addProduct="productListEventHandler(event)"
         duplicateProduct="productListEventHandler(event)"
@@ -94,18 +97,18 @@ limitations under the License.
         removeProduct="productListEventHandler(event)"
         showQuantity="true" />
     
-    <basic:Container style="paddingRight:0">
+    <basic:Container style="paddingRight:0" width="100%">
         <basic:beads>
             <basic:VerticalColumnLayout numColumns="2" />
         </basic:beads>
         <basic:Label text="Total:" width="100%" />
-        <basic:Label width="70" text="{cf.format(total)}" style="textAlign:'right'"/>
+        <basic:Label width="70" text="{cf.format(total)}" id="lblTotal" style="textAlign:'right'"/>
 
         <basic:Label text="Service Fee:" width="100%" />
-        <basic:Label width="70" text="{cf.format(numProducts * SHIPPING)}" style="textAlign:'right'"/>
+        <basic:Label width="70" text="{cf.format(numProducts * SHIPPING)}" id="lblFee" style="textAlign:'right'"/>
 
         <basic:Label text="Grand Total:" style="fontWeight:'bold'" width="100%" />
-        <basic:Label width="70" text="{cf.format(total + (numProducts * SHIPPING))}" style="textAlign:'right'"/>
+        <basic:Label width="70" text="{cf.format(total + (numProducts * SHIPPING))}" id="lblGrandTotal" style="textAlign:'right'"/>
 
     </basic:Container>
 


[08/17] git commit: [flex-asjs] [refs/heads/develop] - add chainbinding

Posted by ah...@apache.org.
add chainbinding


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

Branch: refs/heads/develop
Commit: 82ef6d541e91c88c29707f17e1dbfb87e4f12d50
Parents: 38a59eb
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:05:51 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:05:51 2015 -0800

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82ef6d54/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index bdda6ef..f49da88 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -138,6 +138,7 @@ internal class FlexJSUIClasses
 	import org.apache.flex.core.graphics.GraphicsContainer; GraphicsContainer;
 	import org.apache.flex.core.graphics.LinearGradient; LinearGradient;
     import org.apache.flex.core.DataBindingBase; DataBindingBase;
+    import org.apache.flex.binding.ChainBinding; ChainBinding;
     import org.apache.flex.effects.PlatformWiper; PlatformWiper;    
     import org.apache.flex.events.DragEvent; DragEvent;   
 	import org.apache.flex.events.utils.MouseUtils; MouseUtils;


[14/17] git commit: [flex-asjs] [refs/heads/develop] - implements IMXMLDocument

Posted by ah...@apache.org.
implements IMXMLDocument


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

Branch: refs/heads/develop
Commit: f9d8ac75519717c8a32db92a01318c8055cfff0f
Parents: 70d6ee2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:09:12 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:09:12 2015 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f9d8ac75/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index 39494dc..ce915da 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -14,6 +14,7 @@
 
 goog.provide('org.apache.flex.core.ContainerBase');
 
+goog.require('org.apache.flex.core.IMXMLDocument');
 goog.require('org.apache.flex.core.UIBase');
 goog.require('org.apache.flex.core.ValuesManager');
 
@@ -86,7 +87,8 @@ org.apache.flex.core.ContainerBase.prototype.mxmlsd = null;
  */
 org.apache.flex.core.ContainerBase.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'ContainerBase',
-                qName: 'org.apache.flex.core.ContainerBase'}] };
+                qName: 'org.apache.flex.core.ContainerBase'}] ,
+      interfaces: [org.apache.flex.core.IMXMLDocument]};
 
 
 /**


[09/17] git commit: [flex-asjs] [refs/heads/develop] - handle property fetches

Posted by ah...@apache.org.
handle property fetches


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

Branch: refs/heads/develop
Commit: 3d45d55a7cd30d0af511a90b17bff0c489585a2f
Parents: 82ef6d5
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:06:16 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:06:16 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/core/StatesWithTransitionsImpl.as | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3d45d55a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
index 75b6815..7f23785 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
@@ -247,13 +247,13 @@ package org.apache.flex.core
                     for each (var item:Object in ai.items)
                     {
                         var parent:IParent = ai.document as IParent;
-                        if (ai.destination != null)
-                            parent = parent[ai.destination] as IParent;
+                        if (ai.destination)
+                            parent = getProperty(parent, ai.destination) as IParent;
                         if (ai.relativeTo != null)
                         {
-                            var child:Object = ai.document[ai.relativeTo];
-                            if (ai.destination == null)
-                                parent = child.parent as IParent;
+                            var child:Object = getProperty(ai.document, ai.relativeTo);
+                            if (ai.destination)
+                                parent = IChild(child).parent as IParent;
                             var index:int = parent.getElementIndex(child);
                             if (ai.position == "after")
                                 index++;


[12/17] git commit: [flex-asjs] [refs/heads/develop] - move when beads attached so that containerview can resize contentarea before layout

Posted by ah...@apache.org.
move when beads attached so that containerview can resize contentarea before layout


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

Branch: refs/heads/develop
Commit: 1f3429aa39821c95249a7873c1a306b3e2a15a31
Parents: a3e7225
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:07:56 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:07:56 2015 -0800

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/ContainerView.as | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1f3429aa/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
index d6b587b..9019315 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ContainerView.as
@@ -84,16 +84,6 @@ package org.apache.flex.html.beads
             
             var host:UIBase = value as UIBase;
             
-            if (_strand.getBeadByType(IBeadLayout) == null)
-            {
-                var c:Class = ValuesManager.valuesImpl.getValue(host, "iBeadLayout");
-                if (c)
-                {
-                    var layout:IBeadLayout = new c() as IBeadLayout;
-                    _strand.addBead(layout);
-                }
-            }
-            
             if (host.isWidthSizedToContent() && host.isHeightSizedToContent())
             {
                 host.addEventListener("childrenAdded", changeHandler);
@@ -109,6 +99,16 @@ package org.apache.flex.html.beads
                 else
                     checkActualParent();
             }
+            
+            if (_strand.getBeadByType(IBeadLayout) == null)
+            {
+                var c:Class = ValuesManager.valuesImpl.getValue(host, "iBeadLayout");
+                if (c)
+                {
+                    var layout:IBeadLayout = new c() as IBeadLayout;
+                    _strand.addBead(layout);
+                }
+            }            
         }
         
         private function checkActualParent():Boolean


[10/17] git commit: [flex-asjs] [refs/heads/develop] - react to fewer change events

Posted by ah...@apache.org.
react to fewer change events


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

Branch: refs/heads/develop
Commit: 9c098b71537e33be17c5b76f3249ff75327ee842
Parents: 3d45d55
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:06:35 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:06:35 2015 -0800

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as      | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9c098b71/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
index 7bd82b7..fa86ed1 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
@@ -175,6 +175,12 @@ package org.apache.flex.binding
 		
 		private function changeHandler(event:Event):void
 		{
+            if (event.type == ValueChangeEvent.VALUE_CHANGE)
+            {
+                var vce:ValueChangeEvent = event as ValueChangeEvent;
+                if (vce.propertyName != sourcePropertyName)
+                    return;
+            }
 			destination[destinationPropertyName] = source[sourcePropertyName];
 		}
         


[02/17] git commit: [flex-asjs] [refs/heads/develop] - can't use % to find child because % messes up html side

Posted by ah...@apache.org.
can't use % to find child because % messes up html side


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

Branch: refs/heads/develop
Commit: 7fa32aeb6f70f5dd618e49df91329cbdb530e187
Parents: c6a8107
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:01:32 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:01:32 2015 -0800

----------------------------------------------------------------------
 .../layouts/OneFlexibleChildVerticalLayout.as   | 22 +++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7fa32aeb/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
index cee8cad..50c1d81 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
@@ -56,6 +56,17 @@ package org.apache.flex.html.beads.layouts
 		{
 		}
 		
+        
+        /**
+         *  The flexible child
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public var flexibleChild:IUIBase;
+        
         // the strand/host container is also an ILayoutChild because
         // can have its size dictated by the host's parent which is
         // important to know for layout optimization
@@ -136,7 +147,7 @@ package org.apache.flex.html.beads.layouts
             for (var i:int = 0; i < n; i++)
             {
                 var child:IUIBase = contentView.getElementAt(i) as IUIBase;
-                if (child is ILayoutChild && !isNaN(ILayoutChild(child).percentHeight))
+                if (child == flexibleChild)
                 {
                     flexChildIndex = i;
                     break;
@@ -207,7 +218,7 @@ package org.apache.flex.html.beads.layouts
                 horizontalMargins[i] = { marginLeft: ml, marginRight: mr, halign: halign };
             }
 
-            for (i = n - 1; i >= flexChildIndex; i--)
+            for (i = n - 1; i > flexChildIndex; i--)
 			{
 				child = contentView.getElementAt(i) as IUIBase;
 				margin = ValuesManager.valuesImpl.getValue(child, "margin");
@@ -404,7 +415,12 @@ package org.apache.flex.html.beads.layouts
             var pl:Number = Number(paddingLeft);
             var pt:Number = Number(paddingTop);
             var pr:Number = Number(paddingRight);
-            
+            if (isNaN(pl))
+                pl = 0;
+            if (isNaN(pr))
+                pr = 0;
+            if (isNaN(pt))
+                pt = 0;
             return {paddingLeft:pl, paddingTop:pt, paddingRight:pr};
         }
 


[16/17] git commit: [flex-asjs] [refs/heads/develop] - ILayoutChild extends IChild

Posted by ah...@apache.org.
ILayoutChild extends IChild


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

Branch: refs/heads/develop
Commit: 05117d5f3dea922433fa88641d35e90499c47f06
Parents: 135db98
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:09:59 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:09:59 2015 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/05117d5f/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js
index 4ba8c17..9ab3f1d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js
@@ -19,6 +19,8 @@
 
 goog.provide('org.apache.flex.core.ILayoutChild');
 
+goog.require('org.apache.flex.core.IChild');
+
 
 
 /**
@@ -35,5 +37,6 @@ org.apache.flex.core.ILayoutChild = function() {
  */
 org.apache.flex.core.ILayoutChild.prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'ILayoutChild',
-                qName: 'org.apache.flex.core.ILayoutChild' }] };
+                qName: 'org.apache.flex.core.ILayoutChild' }],
+      interfaces: [org.apache.flex.core.IChild] };
 


[04/17] git commit: [flex-asjs] [refs/heads/develop] - add support for binding to longer chains of properties

Posted by ah...@apache.org.
add support for binding to longer chains of properties


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

Branch: refs/heads/develop
Commit: a3e7664b298b286def0fcd9637c9dade0d3160ad
Parents: add4e92
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 10:03:22 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 10:03:22 2015 -0800

----------------------------------------------------------------------
 .../apache/flex/core/ContainerDataBinding.as    |  18 +-
 .../src/org/apache/flex/binding/ChainBinding.as | 220 +++++++++++++++++++
 .../src/org/apache/flex/binding/ChainBinding.js | 220 +++++++++++++++++++
 3 files changed, 455 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3e7664b/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 28e6c59..12c46d9 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
@@ -18,6 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.core
 {
+    import org.apache.flex.binding.ChainBinding;
     import org.apache.flex.binding.ConstantBinding;
     import org.apache.flex.binding.GenericBinding;
     import org.apache.flex.binding.PropertyWatcher;
@@ -100,13 +101,14 @@ package org.apache.flex.core
                 {
                     if (hasProperty(_strand, binding.source[0]))
                     {
+                        var destObject:Object;
+                        var destination:IStrand;
+                        var compWatcher:Object;
                         if (binding.source.length == 2 && binding.destination.length == 2)
                         {
                             // simple component.property binding
-                            var destObject:Object;
-                            var destination:IStrand;
                             // can be simplebinding or constantbinding
-                            var compWatcher:Object = watchers.watcherMap[binding.source[0]];
+                            compWatcher = watchers.watcherMap[binding.source[0]];
                             fieldWatcher = compWatcher.children.watcherMap[binding.source[1]];
                             if (fieldWatcher.eventNames is String)
                             {
@@ -160,6 +162,16 @@ package org.apache.flex.core
                                 }
                             }
                         }
+                        else
+                        {
+                            compWatcher = watchers.watcherMap[binding.source[0]];
+                            var chb:ChainBinding = new ChainBinding();
+                            chb.destination = binding.destination;
+                            chb.source = binding.source;
+                            chb.watcherChain = compWatcher;
+                            chb.setDocument(_strand);
+                            _strand.addBead(chb);
+                        }
                     }
                 }
                 else if (binding.source is String && binding.destination is Array)

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3e7664b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ChainBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ChainBinding.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ChainBinding.as
new file mode 100644
index 0000000..207246a
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/ChainBinding.as
@@ -0,0 +1,220 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.binding
+{	
+	import flash.events.Event;
+	import flash.events.IEventDispatcher;
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IDocument;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.ValueChangeEvent;
+
+    /**
+     *  The SimpleBinding class is lightweight data-binding class that
+     *  is optimized for simple assignments of one object's property to
+     *  another object's property.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class ChainBinding implements IBead, IDocument
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function ChainBinding()
+		{
+		}
+		
+        /**
+         *  The source chain of property names
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public var source:Array;
+
+        /**
+         *  The host mxml document for the source and
+         *  destination objects.  The source object
+         *  is either this document for simple bindings
+         *  like {foo} where foo is a property on
+         *  the mxml documnet, or found as document[sourceID]
+         *  for simple bindings like {someid.someproperty}
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected var document:Object;
+
+        /**
+         *  The destination property name or chain.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public var destination:Object;
+        
+        /**
+         *  The watcher for the component at
+         *  document[source[0]]
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public var watcherChain:Object;
+        // TODO: (aharui) handle watcher chain
+        
+        private var value:Object;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function set strand(value:IStrand):void
+		{
+            applyBinding();
+        }
+        
+        private function applyBinding():void
+        {
+            var chainSet:Boolean = evaluateSourceChain();
+            if (chainSet)
+                applyValue();
+        }
+        
+        private function evaluateSourceChain():Boolean
+        {
+            var n:int = source.length;
+            var obj:Object = document;
+            for (var i:int = 0; i < n - 1; i++)
+            {
+                var propName:String = source[i];
+                var propObj:Object = obj[propName];
+                var watcher:ChainWatcher = new ChainWatcher(propName, applyBinding);
+                obj.addEventListener("valueChange", watcher.handler);
+                if (propObj == null)
+                    return false;
+                obj = propObj;
+            }
+            propName = source[n - 1];
+            function valueChangeHandler(event:ValueChangeEvent):void {
+                if (event.propertyName != propName)
+                    return;
+                value = event.newValue;
+                applyValue();
+            }
+            obj.addEventListener("valueChange", valueChangeHandler);
+            
+            // we have a complete chain, get the value
+            value = obj[propName];
+            return true;
+        }
+        
+        private function applyValue():void
+        {
+            var destinationName:String;
+            if (destination is String)
+            {
+                destinationName = destination as String;
+                document[destinationName] = value;
+                return;
+            }
+
+            var n:int = destination.length;
+            var obj:Object = document;
+            for (var i:int = 0; i < n - 1; i++)
+            {
+                var propName:String = destination[i];
+                var propObj:Object = obj[propName];
+                function handler(event:ValueChangeEvent):void {
+                    if (event.propertyName != propName)
+                        return;
+                    if (event.oldValue != null)
+                        event.oldValue.removeEventListener("valueChange", handler);
+                    applyValue();
+                }
+                if (propObj == null)
+                {
+                    obj.addEventListener("valueChange", handler);
+                    return;
+                }
+                obj = propObj;
+            }
+            obj[destination[n - 1]] = value;
+            
+		}
+		
+        /**
+         *  @copy org.apache.flex.core.IDocument#setDocument()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function setDocument(document:Object, id:String = null):void
+		{
+			this.document = document;
+		}
+	}
+}
+
+import org.apache.flex.events.ValueChangeEvent;
+
+class ChainWatcher
+{
+    public function ChainWatcher(propertyName:String, callback:Function)
+    {
+        this.propertyName = propertyName;
+        this.callback = callback;
+    }
+
+    private var propertyName:String;
+    private var callback:Function;
+    
+    public function handler(event:ValueChangeEvent):void
+    {
+        if (event.propertyName != propertyName)
+            return;
+        if (event.oldValue != null)
+            event.oldValue.removeEventListener("valueChange", handler);
+        callback();               
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3e7664b/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
new file mode 100644
index 0000000..002555f
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/ChainBinding.js
@@ -0,0 +1,220 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('org.apache.flex.binding.ChainBinding');
+goog.provide('org.apache.flex.binding.ChainWatcher');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.binding.ChainBinding = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.binding.ChainBinding.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'ChainBinding',
+                qName: 'org.apache.flex.binding.ChainBinding'}] };
+
+
+/**
+ * @protected
+ * @type {Object}
+ */
+org.apache.flex.binding.ChainBinding.prototype.document = null;
+
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.binding.ChainBinding.prototype.destination = null;
+
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.binding.ChainBinding.prototype.value = null;
+
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.binding.ChainBinding.prototype.source = null;
+
+
+/**
+ * @expose
+ * @param {Object} value The strand (owner) of the bead.
+ */
+org.apache.flex.binding.ChainBinding.prototype.set_strand = function(value) {
+  this.applyBinding();
+};
+
+
+/**
+ */
+org.apache.flex.binding.ChainBinding.prototype.applyBinding = function() {
+  var chainSet = this.evaluateSourceChain();
+  if (chainSet)
+    this.applyValue();
+};
+
+
+/**
+ * @return {boolean} True if chain complete.
+ */
+org.apache.flex.binding.ChainBinding.prototype.evaluateSourceChain = function() {
+  var propName;
+  var n = this.source.length;
+  var obj = this.document;
+  for (var i = 0; i < n - 1; i++) {
+    propName = this.source[i];
+    var propObj;
+    if (typeof(obj['get_' + propName]) === 'function')
+      propObj = obj['get_' + propName]();
+    else
+      propObj = obj[propName];
+    var watcher = new org.apache.flex.binding.ChainWatcher(propName, this.applyBinding);
+    obj.addEventListener('valueChange', watcher.handler);
+    if (propObj == null)
+      return false;
+    obj = propObj;
+  }
+  propName = this.source[n - 1];
+  var self = this;
+  function valueChangeHandler(event) {
+    if (event.propertyName != propName)
+      return;
+    self.value = event.newValue;
+    self.applyValue();
+  }
+  obj.addEventListener('valueChange', valueChangeHandler);
+
+  // we have a complete chain, get the value
+  if (typeof(obj['get_' + propName]) === 'function')
+    this.value = obj['get_' + propName]();
+  else
+    this.value = obj[propName];
+  return true;
+};
+
+
+/**
+ */
+org.apache.flex.binding.ChainBinding.prototype.applyValue = function() {
+  var destinationName;
+  if (typeof(this.destination) === 'string') {
+    destinationName = this.destination;
+    if (typeof(this.document['set_' + destinationName]) === 'function')
+      this.document['set_' + destinationName](this.value);
+    else
+      this.document[destinationName] = this.value;
+    return;
+  }
+
+  var n = this.destination.length;
+  var obj = this.document;
+  var self = this;
+  for (var i = 0; i < n - 1; i++) {
+    var propName = this.destination[i];
+    var propObj;
+    if (typeof(obj['get_' + propName]) === '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;
+    }
+    obj = propObj;
+  }
+  if (typeof(obj['set_' + this.destination[n - 1]]) === 'function')
+    obj['set_' + this.destination[n - 1]](this.value);
+  else
+    obj[this.destination[n - 1]] = this.value;
+};
+
+
+/**
+ * @expose
+ * @param {Object} document The MXML object.
+ */
+org.apache.flex.binding.ChainBinding.prototype.setDocument = function(document) {
+  this.document = document;
+};
+
+
+
+/**
+ * @constructor
+ * @param {string} propName The name of the property to watch.
+ * @param {function()} cb The callback function.
+ */
+org.apache.flex.binding.ChainWatcher = function(propName, cb) {
+  this.propertyName = propName;
+  this.callback = cb;
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.binding.ChainWatcher.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'ChainWatcher',
+                qName: 'org.apache.flex.binding.ChainWatcher'}] };
+
+
+/**
+ * @protected
+ * @type {string}
+ */
+org.apache.flex.binding.ChainWatcher.prototype.propertyName = '';
+
+
+/**
+ * @protected
+ * @type {?function()}
+ */
+org.apache.flex.binding.ChainWatcher.prototype.callback = null;
+
+
+/**
+ * @expose
+ * @param {Object} event The event object.
+ */
+org.apache.flex.binding.ChainWatcher.prototype.handler = function(event) {
+  if (event.propertyName != this.propertyName)
+    return;
+  if (event.oldValue != null)
+    event.oldValue.removeEventListener('valueChange', this.handler);
+  this.callback();
+};