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:11 UTC

[01/14] git commit: [flex-asjs] [refs/heads/develop] - redo layout on ProductDetails. %'s work differently in HTML

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 123210c3e -> 4e8d6b6a6


redo layout on ProductDetails.  %'s work differently in HTML


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

Branch: refs/heads/develop
Commit: ddfc11fe9094e99ddbef208a8b12ac747931fa57
Parents: 6d14708
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jan 15 16:16:13 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:03 2015 -0800

----------------------------------------------------------------------
 .../src/productsView/ProductDetails.mxml            | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ddfc11fe/examples/FlexJSStore/src/productsView/ProductDetails.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductDetails.mxml b/examples/FlexJSStore/src/productsView/ProductDetails.mxml
index ae128b7..044a896 100755
--- a/examples/FlexJSStore/src/productsView/ProductDetails.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductDetails.mxml
@@ -80,25 +80,25 @@ limitations under the License.
             </fx:Array>
         </basic:dataProvider>
     </basic:ButtonBar>
-    <basic:Container width="100%" height="100%" >
+    <basic:Container >
         <basic:style>
             <basic:SimpleCSSStyles left="4" right="8" top="34" bottom="4" />
         </basic:style>
                     
 
-        <basic:VContainer width="100%" height="100%" includeIn="Features" >
+        <basic:VContainer includeIn="Features" >
             <basic:style>
                 <!--<basic:SimpleCSSStyles gap="8"-->
                 <basic:SimpleCSSStyles
-                    paddingLeft="8" paddingTop="8" paddingRight="8" paddingBottom="8"/>
+                    left="8" top="8" right="8" bottom="8"/>
             </basic:style>
-            <basic:HContainer width="100%" style="gap:12">
+            <basic:Container style="left:0px;right:0px">
 
                 <basic:Image id="img" width="101" height="101" source="{product.image}"/>
 
-                <basic:VContainer id="descr" width="100%" height="100%">
+                <basic:VContainer id="descr" >
                     <basic:style>
-                        <basic:SimpleCSSStyles paddingTop="0" />
+                        <basic:SimpleCSSStyles top="0" left="105" right="0" bottom="20" />
                         <!--<basic:SimpleCSSStyles paddingTop="0" gap="4" />-->
                     </basic:style>
                     
@@ -113,9 +113,9 @@ limitations under the License.
                     <basic:Label text="{cf.format(product.price)}" style="fontWeight:'bold'"/>
 
                 </basic:VContainer>
-            </basic:HContainer>
+            </basic:Container>
 
-            <basic:Label id="descriptionText" width="100%" height="100%" text="{product.description}"/>
+            <basic:Label id="descriptionText" style="left:0px;right:0px;bottom:0px" text="{product.description}"/>
 
         </basic:VContainer>
 


[03/14] git commit: [flex-asjs] [refs/heads/develop] - use setProperty (for now at least)

Posted by ah...@apache.org.
use setProperty (for now at least)


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

Branch: refs/heads/develop
Commit: 2eb10b30c86cb24d9b26f30f7a5570f9c7dd71d7
Parents: bf33956
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jan 23 12:18:28 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:04 2015 -0800

----------------------------------------------------------------------
 examples/FlexJSStore/src/ProductJSONItemConverter.as | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2eb10b30/examples/FlexJSStore/src/ProductJSONItemConverter.as
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/ProductJSONItemConverter.as b/examples/FlexJSStore/src/ProductJSONItemConverter.as
index 4d44ecf..6114b57 100755
--- a/examples/FlexJSStore/src/ProductJSONItemConverter.as
+++ b/examples/FlexJSStore/src/ProductJSONItemConverter.as
@@ -34,7 +34,7 @@ package
             var obj:Object = super.convertItem(data);
             var product:Product = new Product();
             for (var p:String in obj)
-                product[p] = obj[p];
+                setProperty(product, p, obj[p]);
 			return product;
         }
     }


[11/14] git commit: [flex-asjs] [refs/heads/develop] - fix titlebar handling

Posted by ah...@apache.org.
fix titlebar handling


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

Branch: refs/heads/develop
Commit: 44ca43d1a85d953b237cac4d1226fc4de2ad9b35
Parents: d10475a
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jan 23 12:23:18 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:05 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/PanelView.js | 47 +++++++++++++++-----
 1 file changed, 36 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/44ca43d1/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
index 633b1db..13d608f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
@@ -28,6 +28,11 @@ org.apache.flex.html.beads.PanelView = function() {
   */
   this.titleBarAdded_ = false;
 
+  /**
+   * @private
+   * @type {Object}
+  */
+  this.titleBar_ = false;
 };
 
 
@@ -52,13 +57,12 @@ org.apache.flex.html.beads.PanelView.prototype.set_strand =
 
   this.strand_ = value;
 
-  if (!this.titleBar)
-    this.strand_.titleBar = new org.apache.flex.html.TitleBar();
-  else
-    this.strand_.titleBar = this.titleBar;
+  if (!this.titleBar_)
+    this.titleBar_ = new org.apache.flex.html.TitleBar();
 
-  this.strand_.titleBar.set_id('titleBar');
-  this.strand_.titleBar.set_model(this.strand_.get_model());
+  this.strand_.titleBar = this.titleBar_;
+  this.titleBar_.set_id('titleBar');
+  this.titleBar_.set_model(this.strand_.get_model());
 
   this.strand_.controlBar =
       new org.apache.flex.html.ControlBar();
@@ -83,25 +87,26 @@ org.apache.flex.html.beads.PanelView.prototype.changeHandler =
   if (!this.titleBarAdded_)
   {
     this.titleBarAdded_ = true;
-    strand.addElement(strand.titleBar);
-    strand.addElement(strand.controlBar);
+    strand.addElement(this.titleBar_);
+	if (strand.controlBar != null)
+      strand.addElement(strand.controlBar);
   }
 
   if (event.type == 'titleChange') {
-    strand.titleBar.set_title(strand.model.get_title());
+    this.titleBar_.set_title(strand.model.get_title());
   }
 
   var p = this.strand_.positioner;
   if (!strand.isWidthSizedToContent()) {
     var w = strand.get_width();
     w -= p.offsetWidth - p.clientWidth;
-    strand.titleBar.setWidth(w);
+    this.titleBar_.setWidth(w);
     strand.contentArea.style.width = w.toString() + 'px';
     if (strand.controlBar)
       strand.controlBar.setWidth(w);
   }
   if (!strand.isHeightSizedToContent()) {
-    var t = strand.titleBar.get_height();
+    var t = this.titleBar_.get_height();
     var b = 0;
     if (strand.controlBar)
       b = strand.controlBar.get_height();
@@ -112,3 +117,23 @@ org.apache.flex.html.beads.PanelView.prototype.changeHandler =
   }
   this.strand_.dispatchEvent('layoutNeeded');
 };
+
+
+/**
+ * @expose
+ * @return {Object} The titleBar getter.
+ */
+org.apache.flex.html.beads.PanelView.prototype.get_titleBar =
+    function() {
+  return this.titleBar_;
+};
+
+
+/**
+ * @expose
+ * @param {Object} value The titleBar setter.
+ */
+org.apache.flex.html.beads.PanelView.prototype.set_titleBar =
+    function(value) {
+  this.titleBar_ = value;
+};


[05/14] git commit: [flex-asjs] [refs/heads/develop] - handle sizeChanged event

Posted by ah...@apache.org.
handle sizeChanged event


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

Branch: refs/heads/develop
Commit: bf33956055558176c23fc5e58500c8fdd8cf8551
Parents: e2c1c4c
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jan 15 16:19:23 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:04 2015 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js    | 2 ++
 .../src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js      | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bf339560/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
index af01e93..5994971 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ListView.js
@@ -59,6 +59,8 @@ org.apache.flex.html.beads.ListView.prototype.set_strand =
 
   this.strand_ = value;
 
+  this.strand_.addEventListener('sizeChanged',
+      goog.bind(this.handleSizeChange, this));
   this.strand_.addEventListener('widthChanged',
       goog.bind(this.handleSizeChange, this));
   this.strand_.addEventListener('heightChanged',

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bf339560/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
index 0b18e60..82fd3a0 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
@@ -80,6 +80,8 @@ org.apache.flex.html.beads.layouts.ButtonBarLayout.
         goog.bind(this.changeHandler, this));
     this.strand_.addEventListener('heightChanged',
         goog.bind(this.changeHandler, this));
+    this.strand_.addEventListener('sizeChanged',
+        goog.bind(this.changeHandler, this));
     this.strand_.element.style.display = 'block';
   }
 };


[12/14] git commit: [flex-asjs] [refs/heads/develop] - don't run this part unless there are enough children

Posted by ah...@apache.org.
don't run this part unless there are enough children


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

Branch: refs/heads/develop
Commit: 25fd919dd1a081dda3b36f21b2ce8695069009ed
Parents: a77e7f9
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jan 23 12:21:23 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:05 2015 -0800

----------------------------------------------------------------------
 .../layouts/OneFlexibleChildVerticalLayout.as   | 251 ++++++++++---------
 1 file changed, 127 insertions(+), 124 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/25fd919d/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 50c1d81..2a0ad3c 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
@@ -218,60 +218,129 @@ package org.apache.flex.html.beads.layouts
                 horizontalMargins[i] = { marginLeft: ml, marginRight: mr, halign: halign };
             }
 
-            for (i = n - 1; i > flexChildIndex; i--)
-			{
-				child = contentView.getElementAt(i) as IUIBase;
-				margin = ValuesManager.valuesImpl.getValue(child, "margin");
-				if (margin is Array)
-				{
-					if (margin.length == 1)
-						marginLeft = marginTop = marginRight = marginBottom = margin[0];
-					else if (margin.length <= 3)
-					{
-						marginLeft = marginRight = margin[1];
-						marginTop = marginBottom = margin[0];
-					}
-					else if (margin.length == 4)
-					{
-						marginLeft = margin[3];
-						marginBottom = margin[2];
-						marginRight = margin[1];
-						marginTop = margin[0];					
-					}
-				}
-				else if (margin == null)
-				{
-					marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
-					marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
-					marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
-					marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
-				}
-				else
-				{
-					marginLeft = marginTop = marginBottom = marginRight = margin;
-				}
-				mt = Number(marginTop);
-				if (isNaN(mt))
-					mt = 0;
-				mb = Number(marginBottom);
-				if (isNaN(mb))
-					mb = 0;
-				if (marginLeft == "auto")
-					ml = 0;
-				else
-				{
-					ml = Number(marginLeft);
-					if (isNaN(ml))
-						ml = 0;
-				}
-				if (marginRight == "auto")
-					mr = 0;
-				else
-				{
-					mr = Number(marginRight);
-					if (isNaN(mr))
-						mr = 0;
-				}
+            if (n > 0 && n > flexChildIndex)
+            {
+                for (i = n - 1; i > flexChildIndex; i--)
+    			{
+    				child = contentView.getElementAt(i) as IUIBase;
+    				margin = ValuesManager.valuesImpl.getValue(child, "margin");
+    				if (margin is Array)
+    				{
+    					if (margin.length == 1)
+    						marginLeft = marginTop = marginRight = marginBottom = margin[0];
+    					else if (margin.length <= 3)
+    					{
+    						marginLeft = marginRight = margin[1];
+    						marginTop = marginBottom = margin[0];
+    					}
+    					else if (margin.length == 4)
+    					{
+    						marginLeft = margin[3];
+    						marginBottom = margin[2];
+    						marginRight = margin[1];
+    						marginTop = margin[0];					
+    					}
+    				}
+    				else if (margin == null)
+    				{
+    					marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
+    					marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
+    					marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
+    					marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
+    				}
+    				else
+    				{
+    					marginLeft = marginTop = marginBottom = marginRight = margin;
+    				}
+    				mt = Number(marginTop);
+    				if (isNaN(mt))
+    					mt = 0;
+    				mb = Number(marginBottom);
+    				if (isNaN(mb))
+    					mb = 0;
+    				if (marginLeft == "auto")
+    					ml = 0;
+    				else
+    				{
+    					ml = Number(marginLeft);
+    					if (isNaN(ml))
+    						ml = 0;
+    				}
+    				if (marginRight == "auto")
+    					mr = 0;
+    				else
+    				{
+    					mr = Number(marginRight);
+    					if (isNaN(mr))
+    						mr = 0;
+    				}
+                    child.x = ml;
+                    if (child is ILayoutChild)
+                    {
+                        ilc = child as ILayoutChild;
+                        if (!isNaN(ilc.percentWidth))
+                            ilc.setWidth(contentView.width * ilc.percentWidth / 100, true);
+                    }
+                    maxWidth = Math.max(maxWidth, ml + child.width + mr);
+                    child.y = hh - child.height - mb;
+    				hh -= child.height + mt + mb;
+    				lastmt = mt;
+                    halign = ValuesManager.valuesImpl.getValue(child, "horizontal-align");
+                    horizontalMargins[i] = { marginLeft: ml, marginRight: mr, halign: halign };
+    			}
+            
+                child = contentView.getElementAt(flexChildIndex) as IUIBase;
+                margin = ValuesManager.valuesImpl.getValue(child, "margin");
+                if (margin is Array)
+                {
+                    if (margin.length == 1)
+                        marginLeft = marginTop = marginRight = marginBottom = margin[0];
+                    else if (margin.length <= 3)
+                    {
+                        marginLeft = marginRight = margin[1];
+                        marginTop = marginBottom = margin[0];
+                    }
+                    else if (margin.length == 4)
+                    {
+                        marginLeft = margin[3];
+                        marginBottom = margin[2];
+                        marginRight = margin[1];
+                        marginTop = margin[0];					
+                    }
+                }
+                else if (margin == null)
+                {
+                    marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
+                    marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
+                    marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
+                    marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
+                }
+                else
+                {
+                    marginLeft = marginTop = marginBottom = marginRight = margin;
+                }
+                mt = Number(marginTop);
+                if (isNaN(mt))
+                    mt = 0;
+                mb = Number(marginBottom);
+                if (isNaN(mb))
+                    mb = 0;
+                if (marginLeft == "auto")
+                    ml = 0;
+                else
+                {
+                    ml = Number(marginLeft);
+                    if (isNaN(ml))
+                        ml = 0;
+                }
+                if (marginRight == "auto")
+                    mr = 0;
+                else
+                {
+                    mr = Number(marginRight);
+                    if (isNaN(mr))
+                        mr = 0;
+                }
                 child.x = ml;
                 if (child is ILayoutChild)
                 {
@@ -280,78 +349,12 @@ package org.apache.flex.html.beads.layouts
                         ilc.setWidth(contentView.width * ilc.percentWidth / 100, true);
                 }
                 maxWidth = Math.max(maxWidth, ml + child.width + mr);
-                child.y = hh - child.height - mb;
-				hh -= child.height + mt + mb;
-				lastmt = mt;
+                child.y = yy + mt;
+                child.height = hh - yy - mb;
                 halign = ValuesManager.valuesImpl.getValue(child, "horizontal-align");
-                horizontalMargins[i] = { marginLeft: ml, marginRight: mr, halign: halign };
-			}
-            
-            child = contentView.getElementAt(flexChildIndex) as IUIBase;
-            margin = ValuesManager.valuesImpl.getValue(child, "margin");
-            if (margin is Array)
-            {
-                if (margin.length == 1)
-                    marginLeft = marginTop = marginRight = marginBottom = margin[0];
-                else if (margin.length <= 3)
-                {
-                    marginLeft = marginRight = margin[1];
-                    marginTop = marginBottom = margin[0];
-                }
-                else if (margin.length == 4)
-                {
-                    marginLeft = margin[3];
-                    marginBottom = margin[2];
-                    marginRight = margin[1];
-                    marginTop = margin[0];					
-                }
-            }
-            else if (margin == null)
-            {
-                marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
-                marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");
-                marginRight = ValuesManager.valuesImpl.getValue(child, "margin-right");
-                marginBottom = ValuesManager.valuesImpl.getValue(child, "margin-bottom");
+                horizontalMargins[flexChildIndex] = { marginLeft: ml, marginRight: mr, halign: halign };
             }
-            else
-            {
-                marginLeft = marginTop = marginBottom = marginRight = margin;
-            }
-            mt = Number(marginTop);
-            if (isNaN(mt))
-                mt = 0;
-            mb = Number(marginBottom);
-            if (isNaN(mb))
-                mb = 0;
-            if (marginLeft == "auto")
-                ml = 0;
-            else
-            {
-                ml = Number(marginLeft);
-                if (isNaN(ml))
-                    ml = 0;
-            }
-            if (marginRight == "auto")
-                mr = 0;
-            else
-            {
-                mr = Number(marginRight);
-                if (isNaN(mr))
-                    mr = 0;
-            }
-            child.x = ml;
-            if (child is ILayoutChild)
-            {
-                ilc = child as ILayoutChild;
-                if (!isNaN(ilc.percentWidth))
-                    ilc.setWidth(contentView.width * ilc.percentWidth / 100, true);
-            }
-            maxWidth = Math.max(maxWidth, ml + child.width + mr);
-            child.y = yy + mt;
-            child.height = hh - yy - mb;
-            halign = ValuesManager.valuesImpl.getValue(child, "horizontal-align");
-            horizontalMargins[flexChildIndex] = { marginLeft: ml, marginRight: mr, halign: halign };
-
+            
             for (i = 0; i < n; i++)
 			{
 				var obj:Object = horizontalMargins[0]


[07/14] git commit: [flex-asjs] [refs/heads/develop] - fix generic databinding

Posted by ah...@apache.org.
fix generic 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/7df60521
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7df60521
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7df60521

Branch: refs/heads/develop
Commit: 7df60521d537e9d9d17f02208738e0723b6f87cc
Parents: 207359d
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jan 15 16:17:47 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:04 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7df60521/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/PropertyWatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/PropertyWatcher.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/PropertyWatcher.as
index bb8ee4e..9f73139 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/PropertyWatcher.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/PropertyWatcher.as
@@ -142,13 +142,18 @@ package org.apache.flex.binding
             if (source && source is IEventDispatcher)
                 removeEventListeners();
 
-            source = parent;
+            if (source is PropertyWatcher)
+                source = PropertyWatcher(parent).value;
+            else
+                source = parent;
             
             if (source && source is IEventDispatcher)
                 addEventListeners();
             
             // Now get our property.
             wrapUpdate(updateProperty);
+            
+            notifyListeners();            
         }
 
         private function addEventListeners():void


[06/14] git commit: [flex-asjs] [refs/heads/develop] - layout needed this event as well

Posted by ah...@apache.org.
layout needed this event as well


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

Branch: refs/heads/develop
Commit: 874cc1b8316f8b2317f2af96c4371b5e83bb2994
Parents: 7df6052
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jan 15 16:18:19 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:04 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as       | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/874cc1b8/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
index 365b353..4facb06 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.as
@@ -71,6 +71,7 @@ package org.apache.flex.html.beads.layouts
 		public function set strand(value:IStrand):void
 		{
 			_strand = value;
+            IEventDispatcher(value).addEventListener("sizeChanged", changeHandler);
 			IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
 			IEventDispatcher(value).addEventListener("heightChanged", changeHandler);
 			IEventDispatcher(value).addEventListener("childrenAdded", changeHandler);


[10/14] git commit: [flex-asjs] [refs/heads/develop] - use getProperty here as well

Posted by ah...@apache.org.
use getProperty here as well


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

Branch: refs/heads/develop
Commit: a77e7f9f3cec2bc6a55ce6d9b52fcf723e5ff9db
Parents: 2eb10b3
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jan 23 12:19:24 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:05 2015 -0800

----------------------------------------------------------------------
 .../as/projects/FlexJSJX/src/org/apache/flex/effects/Fade.as   | 2 +-
 .../as/projects/FlexJSJX/src/org/apache/flex/effects/Move.as   | 6 +++---
 .../as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as | 2 +-
 .../as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77e7f9f/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Fade.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Fade.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Fade.as
index 28f0d16..90658ff 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Fade.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Fade.as
@@ -134,7 +134,7 @@ public class Fade extends Tween implements IDocument
 	override public function play():void
 	{
         if (target != null)
-            actualTarget = document[target];
+            actualTarget = getProperty(document, target);
 		
 		if (isNaN(alphaFrom))
 			start = actualTarget.alpha;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77e7f9f/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Move.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Move.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Move.as
index 2a42b19..68a9bcd 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Move.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Move.as
@@ -165,7 +165,7 @@ public class Move extends Tween implements IDocument
 	override public function play():void
 	{
 		if (target != null)
-			actualTarget = document[target];
+			actualTarget = getProperty(document, target);
 		
 		if (isNaN(xFrom))
 			xStart = actualTarget.x;
@@ -220,7 +220,7 @@ public class Move extends Tween implements IDocument
     {
         if (target != null)
         {
-            actualTarget = document[target];
+            actualTarget = getProperty(document, target);
             xFrom = actualTarget.x;
             yFrom = actualTarget.y;
         }
@@ -230,7 +230,7 @@ public class Move extends Tween implements IDocument
     {
         if (target != null)
         {
-            actualTarget = document[target];
+            actualTarget = getProperty(document, target);
             xTo = actualTarget.x;
             yTo = actualTarget.y;
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77e7f9f/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as
index 2ee1e15..eff8d6b 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as
@@ -153,7 +153,7 @@ public class Resize extends Tween implements IDocument
 	override public function play():void
 	{
         if (target != null)
-            actualTarget = document[target];
+            actualTarget = getProperty(document, target);
 		
 		if (isNaN(widthFrom))
 			widthStart = actualTarget.width;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a77e7f9f/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
index fe83935..4877215 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
@@ -117,7 +117,7 @@ public class Wipe extends Tween implements IDocument
 	override public function play():void
 	{
         if (target != null)
-            actualTarget = document[target];
+            actualTarget = getProperty(document, target);
         
 		
         wiper.target = actualTarget;


[02/14] git commit: [flex-asjs] [refs/heads/develop] - temporarily pin the details panel to the top. JS basic layout probably should do it for you

Posted by ah...@apache.org.
temporarily pin the details panel to the top.  JS basic layout probably should do it for you


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

Branch: refs/heads/develop
Commit: 6d14708c474f634f6fc38c6465c25e1aff9d81cf
Parents: 123210c
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jan 15 16:15:33 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:03 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6d14708c/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml b/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml
index e944e9b..6879199 100755
--- a/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductCatalogPanel.mxml
@@ -529,7 +529,7 @@ limitations under the License.
             </basic:beads>
             <basic:Container id="thumbContent" width="100%" height="100%" />
         </basic:Container>
-        <productsView:ProductDetails id="details"
+        <productsView:ProductDetails id="details" y="0"
             width="{ProductCatalogThumbnail.COL_WIDTH_4 * 3}"
             height="100%"
             visible="false"


[04/14] git commit: [flex-asjs] [refs/heads/develop] - establish separate arrays for each instance. In the future, the compiler should generate these off the constructor and not the prototype where they get shared

Posted by ah...@apache.org.
establish separate arrays for each instance.  In the future, the compiler should generate these off the constructor and not the prototype where they get shared


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

Branch: refs/heads/develop
Commit: 207359d0952ed7a944e45ccdfe89012859888e30
Parents: ddfc11f
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jan 15 16:17:10 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:04 2015 -0800

----------------------------------------------------------------------
 examples/FlexJSStore/src/productsView/ProductList.mxml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/207359d0/examples/FlexJSStore/src/productsView/ProductList.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductList.mxml b/examples/FlexJSStore/src/productsView/ProductList.mxml
index e99397d..88d3377 100755
--- a/examples/FlexJSStore/src/productsView/ProductList.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductList.mxml
@@ -45,7 +45,7 @@ limitations under the License.
         import samples.flexstore.Product;
         import samples.flexstore.ProductListEvent;
         
-        public var items:Array = [];
+        public var items:Array;
         
         public var newItemStartX:int;
         public var newItemStartY:int;
@@ -57,6 +57,9 @@ limitations under the License.
         
         public function addProduct(product:Product):void
 		{
+            if (items == null)
+                items = [];
+            
             var index:int = indexOf(product.productId);
             var event:ProductListEvent;
             var item:ProductListItem;


[13/14] git commit: [flex-asjs] [refs/heads/develop] - add getprop/setprop

Posted by ah...@apache.org.
add getprop/setprop


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

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

----------------------------------------------------------------------
 .../org/apache/flex/net/JSONItemConverter.as    | 29 ++++++++++++++++++
 .../org/apache/flex/net/JSONItemConverter.js    | 32 ++++++++++++++++++++
 2 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/74a47a87/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/JSONItemConverter.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/JSONItemConverter.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/JSONItemConverter.as
index d8e1251..5df299a 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/JSONItemConverter.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/JSONItemConverter.as
@@ -41,5 +41,34 @@ package org.apache.flex.net
                 data += "}";
             return JSON.parse(data);
         }
+        
+        /**
+         *  Get a property from an object.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected function getProperty(obj:Object, propName:String):*
+        {
+            if (propName === 'this')
+                return obj;
+            
+            return obj[propName];
+        }
+        
+        /**
+         *  Set a property on an object.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected function setProperty(obj:Object, propName:String, value:*):void
+        {
+            obj[propName] = value;
+        }
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/74a47a87/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
index 3ef832c..d405d0a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
@@ -46,3 +46,35 @@ org.apache.flex.net.JSONItemConverter.prototype.convertItem = function(s) {
     s += '}';
   return JSON.parse(s);
 };
+
+
+/**
+ * @expose
+ * @param {Object} obj The object.
+ * @param {string} propName The name of the property.
+ * @return {Object} value The value of the property.
+ */
+org.apache.flex.net.JSONItemConverter.prototype.getProperty =
+    function(obj, propName) {
+  if (typeof obj['get_' + propName] === 'function') {
+    return obj['get_' + propName]();
+  }
+  return obj[propName];
+};
+
+
+/**
+ * @expose
+ * @param {Object} obj The object.
+ * @param {string} propName The name of the property.
+ * @param {Object} value The value of the property.
+ */
+org.apache.flex.net.JSONItemConverter.prototype.setProperty =
+function(obj, propName, value) {
+  if (typeof obj['set_' + propName] === 'function') {
+    obj['set_' + propName](value);
+  } else {
+    obj[propName] = value;
+  }
+};
+


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

Posted by ah...@apache.org.
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;


[14/14] git commit: [flex-asjs] [refs/heads/develop] - use quotes so these don't get renamed

Posted by ah...@apache.org.
use quotes so these don't get renamed


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

Branch: refs/heads/develop
Commit: 4e8d6b6a697c7273c8175f97634b3a774b6d8a1a
Parents: 44ca43d
Author: Alex Harui <ah...@apache.org>
Authored: Fri Jan 23 12:23:50 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:06 2015 -0800

----------------------------------------------------------------------
 .../org/apache/flex/core/SimpleCSSValuesImpl.js | 20 ++++++++++----------
 .../src/org/apache/flex/events/DragEvent.js     |  4 ++--
 .../org/apache/flex/events/EventDispatcher.js   | 14 +++++++-------
 3 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4e8d6b6a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
index 7d9e92a..6c538dc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
@@ -270,13 +270,13 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles
  * The styles that apply to each UI widget
  */
 org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles = {
-   backgroundColor: 1,
-   backgroundImage: 1,
-   color: 1,
-   fontFamily: 1,
-   fontWeight: 1,
-   fontSize: 1,
-   fontStyle: 1
+   'backgroundColor': 1,
+   'backgroundImage': 1,
+   'color': 1,
+   'fontFamily': 1,
+   'fontWeight': 1,
+   'fontSize': 1,
+   'fontStyle': 1
 };
 
 
@@ -284,9 +284,9 @@ org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles = {
  * The styles that use color format #RRGGBB
  */
 org.apache.flex.core.SimpleCSSValuesImpl.colorStyles = {
-   backgroundColor: 1,
-   borderColor: 1,
-   color: 1
+   'backgroundColor': 1,
+   'borderColor': 1,
+   'color': 1
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4e8d6b6a/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
index 648821a..0b387ec 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
@@ -133,8 +133,8 @@ org.apache.flex.events.DragEvent.DRAG_DROP = 'dragDrop';
  */
 org.apache.flex.events.DragEvent.installDragEventMixin = function() {
   var o = org.apache.flex.events.EventDispatcher.elementEvents;
-  o.dragEnd = 1;
-  o.dragMove = 1;
+  o['dragEnd'] = 1;
+  o['dragMove'] = 1;
   return true;
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4e8d6b6a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
index 617e8bc..3129175 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
@@ -103,12 +103,12 @@ function(obj, propName, value) {
  * @type {Object}
  */
 org.apache.flex.events.EventDispatcher.elementEvents = {
-  mouseover: 1,
-  mouseout: 1,
-  mouseup: 1,
-  mousedown: 1,
-  mousemove: 1,
-  rollover: 1,
-  rollout: 1
+  'mouseover': 1,
+  'mouseout': 1,
+  'mouseup': 1,
+  'mousedown': 1,
+  'mousemove': 1,
+  'rollover': 1,
+  'rollout': 1
 };
 


[08/14] git commit: [flex-asjs] [refs/heads/develop] - handle having dp set after selectedIndex

Posted by ah...@apache.org.
handle having dp set after selectedIndex


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

Branch: refs/heads/develop
Commit: e2c1c4cf096086709109d2d147d93e6eb5131c00
Parents: 874cc1b
Author: Alex Harui <ah...@apache.org>
Authored: Thu Jan 15 16:18:53 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Jan 23 12:24:04 2015 -0800

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/models/ArraySelectionModel.as    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e2c1c4cf/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ArraySelectionModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ArraySelectionModel.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ArraySelectionModel.as
index 24c383c..cf692fc 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ArraySelectionModel.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ArraySelectionModel.as
@@ -86,6 +86,9 @@ package org.apache.flex.html.beads.models
 		public function set dataProvider(value:Object):void
 		{
             _dataProvider = value;
+            if (_selectedIndex != -1)
+                _selectedItem = (_dataProvider == null || _selectedIndex >= _dataProvider.length) ? null : 
+                    _dataProvider[value];
 			dispatchEvent(new Event("dataProviderChanged"));
 		}
 
@@ -136,7 +139,7 @@ package org.apache.flex.html.beads.models
 		public function set selectedIndex(value:int):void
 		{
 			_selectedIndex = value;
-			_selectedItem = (value == -1) ? null : (value < _dataProvider.length) ? _dataProvider[value] : null;
+			_selectedItem = (value == -1 || _dataProvider == null) ? null : (value < _dataProvider.length) ? _dataProvider[value] : null;
 			dispatchEvent(new Event("selectedIndexChanged"));			
 		}