You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/05/23 01:04:20 UTC

[01/15] git commit: [flex-asjs] [refs/heads/develop] - switch flexibleChild to id so it can be found before bindings get applied

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 1ab5705f6 -> 3aa038b93


switch flexibleChild to id so it can be found before bindings get applied


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

Branch: refs/heads/develop
Commit: cb82c4fb18d396c72d888014c97090c16ad2fc12
Parents: 1fc77cb
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:24:51 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:10 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb82c4fb/examples/FlexJSStore/src/productsView/ProductCart.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductCart.mxml b/examples/FlexJSStore/src/productsView/ProductCart.mxml
index 8c42027..0d509b6 100755
--- a/examples/FlexJSStore/src/productsView/ProductCart.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductCart.mxml
@@ -30,7 +30,7 @@ limitations under the License.
     </js:style>
     <js:beads>
         <js:ContainerDataBinding />
-        <js:OneFlexibleChildVerticalLayout id="flexLayout" flexibleChild="{productList}" />
+        <js:OneFlexibleChildVerticalLayout id="flexLayout" flexibleChild="productList" />
     </js:beads>
     <fx:Script>
         <![CDATA[


[04/15] git commit: [flex-asjs] [refs/heads/develop] - Panel needs to override the set of children

Posted by ah...@apache.org.
Panel needs to override the set of 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/1f02405a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1f02405a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1f02405a

Branch: refs/heads/develop
Commit: 1f02405a229220cf1cbbcfa1f61eb769c4441b29
Parents: f8d91e6
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:28:44 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:11 2015 -0700

----------------------------------------------------------------------
 .../projects/HTML/js/src/org/apache/flex/html/Panel.js    | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1f02405a/frameworks/projects/HTML/js/src/org/apache/flex/html/Panel.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/Panel.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/Panel.js
index f0baa42..d94415f 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/Panel.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/Panel.js
@@ -138,6 +138,16 @@ org_apache_flex_html_Panel.prototype.addedToParent =
 };
 
 
+/**
+ * @override
+ * @return {Array} the HTML DOM element children.
+ */
+org_apache_flex_html_Panel.prototype.internalChildren =
+    function(c, index) {
+  return this.contentArea.children;
+};
+
+
 Object.defineProperties(org_apache_flex_html_Panel.prototype, {
     /** @expose */
     showCloseButton: {


[03/15] git commit: [flex-asjs] [refs/heads/develop] - add re-compile to pick up asjs JS files

Posted by ah...@apache.org.
add re-compile to pick up asjs JS files


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

Branch: refs/heads/develop
Commit: 6d9672c63cf5f160e1492cdc15cb5002020472ad
Parents: 1ab5705
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:21:35 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:10 2015 -0700

----------------------------------------------------------------------
 build.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6d9672c6/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 4467450..96747d0 100644
--- a/build.xml
+++ b/build.xml
@@ -72,7 +72,7 @@
         Each of the main targets for the modules will call clean themselves before proceeding.
     -->
 
-    <target name="main" depends="prebuild,frameworks-as,frameworks-js,post-build" description="Full build">
+    <target name="main" depends="prebuild,frameworks-as,frameworks-js,frameworks-recompile,post-build" description="Full build">
         <tstamp>
         	<format property="build.datetime" pattern="MM/dd/yyyy hh:mm:ss aa" />
         </tstamp>
@@ -418,6 +418,12 @@
         </ant>
     </target>
 
+    <target name="frameworks-recompile" description="Full build of all Actionscript framework SWCs, which picks up JS files">
+        <ant dir="${basedir}/frameworks" target="re-compile">
+            <property name="locale" value="${locale}"/>
+        </ant>
+    </target>
+
     <target name="other.locales" description="Build resource SWCs for additional locales">
         <!--<ant dir="${basedir}/frameworks" target="other.locales"/>-->
     </target>


[09/15] git commit: [flex-asjs] [refs/heads/develop] - TitleBar needs to have a position so children are relative to it

Posted by ah...@apache.org.
TitleBar needs to have a position so children are relative to it


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

Branch: refs/heads/develop
Commit: a23a860e105187209b95f42c6f0b581e92b70d44
Parents: 1f02405
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:29:16 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:12 2015 -0700

----------------------------------------------------------------------
 frameworks/projects/HTML/js/src/org/apache/flex/html/TitleBar.js | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a23a860e/frameworks/projects/HTML/js/src/org/apache/flex/html/TitleBar.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/TitleBar.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/TitleBar.js
index 5a8b087..02bfc00 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/TitleBar.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/TitleBar.js
@@ -52,6 +52,7 @@ org_apache_flex_html_TitleBar.prototype.createElement =
   this.element = document.createElement('div');
 
   this.positioner = this.element;
+  this.positioner.style.position = 'relative';
   this.element.flexjs_wrapper = this;
 
   this.className = 'TitleBar';


[14/15] git commit: [flex-asjs] [refs/heads/develop] - refactor layout on the JS side

Posted by ah...@apache.org.
refactor layout on the JS 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/31c980a8
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/31c980a8
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/31c980a8

Branch: refs/heads/develop
Commit: 31c980a81c3bbc3ee77d3b0a990dbf9c07383cc9
Parents: cac7be7
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:31:02 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:12 2015 -0700

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/ContainerView.js | 71 ++++++++++++++++++++
 .../src/org/apache/flex/html/beads/PanelView.js | 36 ++++++----
 .../flex/html/beads/layouts/BasicLayout.js      | 40 +----------
 .../html/beads/layouts/BasicScrollingLayout.js  |  7 +-
 .../flex/html/beads/layouts/HorizontalLayout.js | 41 +----------
 .../flex/html/beads/layouts/TileLayout.js       |  7 +-
 .../flex/html/beads/layouts/VerticalLayout.js   | 41 +----------
 .../beads/layouts/VerticalScrollingLayout.js    |  7 ++
 8 files changed, 105 insertions(+), 145 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
index 91b8373..c4771c1 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
@@ -15,6 +15,7 @@
 goog.provide('org_apache_flex_html_beads_ContainerView');
 
 goog.require('org_apache_flex_core_BeadViewBase');
+goog.require('org_apache_flex_core_IBeadLayout');
 goog.require('org_apache_flex_core_ILayoutParent');
 
 
@@ -46,6 +47,54 @@ org_apache_flex_html_beads_ContainerView.prototype.FLEXJS_CLASS_INFO =
     };
 
 
+/**
+ *
+ */
+org_apache_flex_html_beads_ContainerView.
+    prototype.addOtherListeners = function() {
+  this._strand.addEventListener('childrenAdded',
+      goog.bind(this.changeHandler, this));
+  this._strand.addEventListener('layoutNeeded',
+     goog.bind(this.changeHandler, this));
+  this._strand.addEventListener('itemsCreated',
+     goog.bind(this.changeHandler, this));
+};
+
+
+/**
+ * @param {org_apache_flex_events_Event} event The event.
+ */
+org_apache_flex_html_beads_ContainerView.
+    prototype.changeHandler = function(event) {
+  if (this.layout_ == null) {
+    this.layout_ = this._strand.getBeadByType(org_apache_flex_core_IBeadLayout);
+    if (this.layout_ == null) {
+      var m3 = org_apache_flex_core_ValuesManager.valuesImpl.getValue(this._strand, 'iBeadLayout');
+      this.layout_ = new m3();
+      this._strand.addBead(this.layout_);
+      //this.layout_.strand = this.strand_;
+    }
+  }
+  this.layout_.layout();
+  var max = this.layout_.maxWidth;
+  if (isNaN(this.resizableView.explicitWidth) && !isNaN(max))
+    this.resizableView.setWidth(max, true);
+  max = this.layout_.maxHeight;
+  if (isNaN(this.resizableView.explicitHeight) && !isNaN(max))
+    this.resizableView.setHeight(max, true);
+};
+
+
+/**
+ * @param {org_apache_flex_events_Event} event The event.
+ */
+org_apache_flex_html_beads_ContainerView.
+    prototype.sizeChangeHandler = function(event) {
+  this.addOtherListeners();
+  this.changeHandler(event);
+};
+
+
 Object.defineProperties(org_apache_flex_html_beads_ContainerView.prototype, {
     /** @expose */
     contentView: {
@@ -60,5 +109,27 @@ Object.defineProperties(org_apache_flex_html_beads_ContainerView.prototype, {
         get: function() {
             return this._strand;
         }
+    },
+    /** @expose */
+    strand: {
+        /** @this {org_apache_flex_html_beads_ContainerView} */
+        set: function(value) {
+            org_apache_flex_utils_Language.superSetter(org_apache_flex_html_beads_ContainerView, this, 'strand', value);
+            if (this._strand.isWidthSizedToContent() &&
+                this._strand.isHeightSizedToContent())
+              this.addOtherListeners();
+            else {
+              this._strand.addEventListener('heightChanged',
+                  goog.bind(this.changeHandler, this));
+              this._strand.addEventListener('widthChanged',
+                  goog.bind(this.changeHandler, this));
+              this._strand.addEventListener('sizeChanged',
+                  goog.bind(this.sizeChangeHandler, this));
+              if (!isNaN(this._strand.explicitWidth) &&
+                  !isNaN(this._strand.explicitHeight))
+                this.addOtherListeners();
+            }
+         }
     }
+
 });

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
index 4042eec..206ec20 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
@@ -14,7 +14,7 @@
 
 goog.provide('org_apache_flex_html_beads_PanelView');
 
-goog.require('org_apache_flex_core_IBeadView');
+goog.require('org_apache_flex_html_beads_ContainerView');
 
 
 
@@ -22,6 +22,7 @@ goog.require('org_apache_flex_core_IBeadView');
  * @constructor
  */
 org_apache_flex_html_beads_PanelView = function() {
+  org_apache_flex_html_beads_PanelView.base(this, 'constructor');
   /**
    * @private
    * @type {boolean}
@@ -34,6 +35,9 @@ org_apache_flex_html_beads_PanelView = function() {
   */
   this.titleBar_ = null;
 };
+goog.inherits(
+    org_apache_flex_html_beads_PanelView,
+    org_apache_flex_html_beads_ContainerView);
 
 
 /**
@@ -44,33 +48,36 @@ org_apache_flex_html_beads_PanelView = function() {
 org_apache_flex_html_beads_PanelView
   .prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'PanelView',
-                qName: 'org_apache_flex_html_beads_PanelView'}],
-      interfaces: [org_apache_flex_core_IBeadView] };
+                qName: 'org_apache_flex_html_beads_PanelView'}]};
 
 
 Object.defineProperties(org_apache_flex_html_beads_PanelView.prototype, {
     /** @expose */
+    contentView: {
+        /** @this {org_apache_flex_html_beads_ContainerView} */
+        get: function() {
+            return this._strand.contentArea;
+        }
+    },
+    /** @expose */
     strand: {
         /** @this {org_apache_flex_html_beads_PanelView} */
         set: function(value) {
-            this.strand_ = value;
+            org_apache_flex_utils_Language.superSetter(org_apache_flex_html_beads_PanelView, this, 'strand', value);
 
             if (!this.titleBar_)
               this.titleBar_ = new org_apache_flex_html_TitleBar();
 
-            this.strand_.titleBar = this.titleBar_;
+            this._strand.titleBar = this.titleBar_;
             this.titleBar_.id = 'titleBar';
-            this.titleBar_.model = this.strand_.model;
+            this.titleBar_.model = this._strand.model;
 
-            this.strand_.controlBar =
+            this._strand.controlBar =
                 new org_apache_flex_html_ControlBar();
 
-            this.strand_.addEventListener('childrenAdded',
-                goog.bind(this.changeHandler, this));
-
             // listen for changes to the strand's model so items can be changed
             // in the view
-            this.strand_.model.addEventListener('titleChange',
+            this._strand.model.addEventListener('titleChange',
                 goog.bind(this.changeHandler, this));
         }
     },
@@ -89,11 +96,12 @@ Object.defineProperties(org_apache_flex_html_beads_PanelView.prototype, {
 
 
 /**
+ * @override
  * @param {Object} event The event that triggered this handler.
  */
 org_apache_flex_html_beads_PanelView.prototype.changeHandler =
     function(event) {
-  var strand = this.strand_;
+  var strand = this._strand;
   if (!this.titleBarAdded_)
   {
     this.titleBarAdded_ = true;
@@ -106,7 +114,7 @@ org_apache_flex_html_beads_PanelView.prototype.changeHandler =
     this.titleBar_.title = strand.model.title;
   }
 
-  var p = this.strand_.positioner;
+  var p = this._strand.positioner;
   if (!strand.isWidthSizedToContent()) {
     var w = strand.width;
     w -= p.offsetWidth - p.clientWidth;
@@ -125,5 +133,5 @@ org_apache_flex_html_beads_PanelView.prototype.changeHandler =
     h -= p.offsetHeight - p.clientHeight;
     strand.contentArea.style.height = h.toString() + 'px';
   }
-  this.strand_.dispatchEvent('layoutNeeded');
+  org_apache_flex_html_beads_PanelView.base(this, 'changeHandler', event);
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
index 9126b28..ac7b2c6 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicLayout.js
@@ -50,19 +50,6 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_BasicLayout.prototype
         set: function(value) {
             if (this.strand_ !== value) {
               this.strand_ = value;
-              if (this.strand_.isWidthSizedToContent() &&
-                this.strand_.isHeightSizedToContent())
-                this.addOtherListeners();
-              else {
-                this.strand_.addEventListener('heightChanged',
-                    goog.bind(this.changeHandler, this));
-                this.strand_.addEventListener('widthChanged',
-                    goog.bind(this.changeHandler, this));
-                this.strand_.addEventListener('sizeChanged',
-                    goog.bind(this.sizeChangeHandler, this));
-
-                this.addOtherListeners();
-              }
             }
         }
     }
@@ -70,34 +57,9 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_BasicLayout.prototype
 
 
 /**
- *
- */
-org_apache_flex_html_beads_layouts_BasicLayout.
-    prototype.addOtherListeners = function() {
-  this.strand_.addEventListener('childrenAdded',
-      goog.bind(this.changeHandler, this));
-  this.strand_.addEventListener('layoutNeeded',
-     goog.bind(this.changeHandler, this));
-  this.strand_.addEventListener('itemsCreated',
-     goog.bind(this.changeHandler, this));
-};
-
-
-/**
- * @param {org_apache_flex_events_Event} event The event.
- */
-org_apache_flex_html_beads_layouts_BasicLayout.
-    prototype.sizeChangeHandler = function(event) {
-  this.addOtherListeners();
-  this.changeHandler(event);
-};
-
-
-/**
- * @param {org_apache_flex_events_Event} event The text getter.
  */
 org_apache_flex_html_beads_layouts_BasicLayout.
-    prototype.changeHandler = function(event) {
+    prototype.layout = function() {
   var i, n, h, w;
 
   var viewBead = this.strand_.getBeadByType(org_apache_flex_core_ILayoutParent);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicScrollingLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicScrollingLayout.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicScrollingLayout.js
index 86c51a2..162ec41 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicScrollingLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/BasicScrollingLayout.js
@@ -47,10 +47,6 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_BasicScrollingLayout.
         set: function(value) {
             if (this.strand_ !== value) {
               this.strand_ = value;
-              this.strand_.addEventListener('childrenAdded',
-                  goog.bind(this.changeHandler, this));
-              this.strand_.addEventListener('layoutNeeded',
-                  goog.bind(this.changeHandler, this));
             }
         }
     }
@@ -58,10 +54,9 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_BasicScrollingLayout.
 
 
 /**
- * @param {org_apache_flex_events_Event} event The text getter.
  */
 org_apache_flex_html_beads_layouts_BasicScrollingLayout.
-    prototype.changeHandler = function(event) {
+    prototype.layout = function() {
   var i, n, h, w;
 
   var viewBead = this.strand_.getBeadByType(org_apache_flex_core_ILayoutParent);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
index 55d4fb0..05e2ebf 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/HorizontalLayout.js
@@ -48,20 +48,6 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_HorizontalLayout.prot
         set: function(value) {
             if (this.strand_ !== value) {
               this.strand_ = value;
-              if (this.strand_.isWidthSizedToContent() &&
-                  this.strand_.isHeightSizedToContent())
-                this.addOtherListeners();
-              else {
-                this.strand_.addEventListener('heightChanged',
-                    goog.bind(this.changeHandler, this));
-                this.strand_.addEventListener('widthChanged',
-                    goog.bind(this.changeHandler, this));
-                this.strand_.addEventListener('sizeChanged',
-                    goog.bind(this.sizeChangeHandler, this));
-                if (!isNaN(this.strand_.explicitWidth) &&
-                    !isNaN(this.strand_.explicitHeight))
-                    this.addOtherListeners();
-              }
               this.strand_.element.style.display = 'block';
             }
         }
@@ -70,34 +56,9 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_HorizontalLayout.prot
 
 
 /**
- *
- */
-org_apache_flex_html_beads_layouts_HorizontalLayout.
-    prototype.addOtherListeners = function() {
-  this.strand_.addEventListener('childrenAdded',
-      goog.bind(this.changeHandler, this));
-  this.strand_.addEventListener('layoutNeeded',
-     goog.bind(this.changeHandler, this));
-  this.strand_.addEventListener('itemsCreated',
-     goog.bind(this.changeHandler, this));
-};
-
-
-/**
- * @param {org_apache_flex_events_Event} event The event.
- */
-org_apache_flex_html_beads_layouts_HorizontalLayout.
-    prototype.sizeChangeHandler = function(event) {
-  this.addOtherListeners();
-  this.changeHandler(event);
-};
-
-
-/**
- * @param {org_apache_flex_events_Event} event The text getter.
  */
 org_apache_flex_html_beads_layouts_HorizontalLayout.
-    prototype.changeHandler = function(event) {
+    prototype.layout = function() {
   var children, i, n;
 
   children = this.strand_.internalChildren();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
index 72354b0..d19d760 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/TileLayout.js
@@ -47,10 +47,6 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_TileLayout.prototype,
         set: function(value) {
             if (this.strand_ !== value) {
               this.strand_ = value;
-              this.strand_.addEventListener('childrenAdded',
-                  goog.bind(this.changeHandler, this));
-              this.strand_.addEventListener('layoutNeeded',
-                  goog.bind(this.changeHandler, this));
             }
         }
     },
@@ -91,10 +87,9 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_TileLayout.prototype,
 
 
 /**
- * @param {org_apache_flex_events_Event} event The text getter.
  */
 org_apache_flex_html_beads_layouts_TileLayout.
-    prototype.changeHandler = function(event) {
+    prototype.layout = function() {
   var children, i, n, child;
   var xpos, ypos, useWidth, useHeight;
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
index f3214eb..ee2a0ec 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalLayout.js
@@ -47,20 +47,6 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_VerticalLayout.protot
         set: function(value) {
             if (this.strand_ !== value) {
               this.strand_ = value;
-              if (this.strand_.isWidthSizedToContent() &&
-                this.strand_.isHeightSizedToContent())
-                this.addOtherListeners();
-              else {
-                this.strand_.addEventListener('heightChanged',
-                    goog.bind(this.changeHandler, this));
-                this.strand_.addEventListener('widthChanged',
-                    goog.bind(this.changeHandler, this));
-                this.strand_.addEventListener('sizeChanged',
-                    goog.bind(this.sizeChangeHandler, this));
-                if (!isNaN(this.strand_.explicitWidth) &&
-                    !isNaN(this.strand_.explicitHeight))
-                  this.addOtherListeners();
-               }
             }
         }
     }
@@ -68,34 +54,9 @@ Object.defineProperties(org_apache_flex_html_beads_layouts_VerticalLayout.protot
 
 
 /**
- *
- */
-org_apache_flex_html_beads_layouts_VerticalLayout.
-    prototype.addOtherListeners = function() {
-  this.strand_.addEventListener('childrenAdded',
-      goog.bind(this.changeHandler, this));
-  this.strand_.addEventListener('layoutNeeded',
-     goog.bind(this.changeHandler, this));
-  this.strand_.addEventListener('itemsCreated',
-     goog.bind(this.changeHandler, this));
-};
-
-
-/**
- * @param {org_apache_flex_events_Event} event The event.
- */
-org_apache_flex_html_beads_layouts_VerticalLayout.
-    prototype.sizeChangeHandler = function(event) {
-  this.addOtherListeners();
-  this.changeHandler(event);
-};
-
-
-/**
- * @param {org_apache_flex_events_Event} event The text getter.
  */
 org_apache_flex_html_beads_layouts_VerticalLayout.
-    prototype.changeHandler = function(event) {
+    prototype.layout = function() {
   var children, i, n;
 
   children = this.strand_.internalChildren();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/31c980a8/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalScrollingLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalScrollingLayout.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalScrollingLayout.js
index 6df6e0c..aa7baba 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalScrollingLayout.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/layouts/VerticalScrollingLayout.js
@@ -29,6 +29,13 @@ org_apache_flex_html_beads_layouts_VerticalScrollingLayout = function() {
 
 
 /**
+ */
+org_apache_flex_html_beads_layouts_VerticalScrollingLayout.
+    prototype.layout = function() {
+};
+
+
+/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}


[11/15] git commit: [flex-asjs] [refs/heads/develop] - needs to be IBeadModel

Posted by ah...@apache.org.
needs to be IBeadModel


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

Branch: refs/heads/develop
Commit: eb3eabaf7ea24520ca79180bed1d7dbe13cb093e
Parents: a23a860
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:29:43 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:12 2015 -0700

----------------------------------------------------------------------
 .../HTML/js/src/org/apache/flex/html/beads/models/PanelModel.js     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb3eabaf/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/models/PanelModel.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/models/PanelModel.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/models/PanelModel.js
index 0f2c434..e872ac5 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/models/PanelModel.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/models/PanelModel.js
@@ -14,6 +14,7 @@
 
 goog.provide('org_apache_flex_html_beads_models_PanelModel');
 
+goog.require('org_apache_flex_core_IBeadModel');
 goog.require('org_apache_flex_events_EventDispatcher');
 
 


[06/15] git commit: [flex-asjs] [refs/heads/develop] - fix minor bug

Posted by ah...@apache.org.
fix minor bug


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

Branch: refs/heads/develop
Commit: f8d91e6f34bb0b5a58bb06f237b84cbaec85d178
Parents: d2fe78a
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:28:03 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:11 2015 -0700

----------------------------------------------------------------------
 .../as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as  | 2 +-
 .../as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f8d91e6f/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
index 5400432..95ae30c 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/HorizontalLayout.as
@@ -250,7 +250,7 @@ package org.apache.flex.html.beads.layouts
             else 
             {
                 child.y = mt;
-                hh -= top;
+                hh -= mt;
             }
             if (!isNaN(bottom))
             {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f8d91e6f/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
index b758f88..d722d09 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
@@ -264,7 +264,7 @@ package org.apache.flex.html.beads.layouts
             else 
             {
                 child.x = ml;
-                ww -= left;
+                ww -= ml;
             }
             if (!isNaN(right))
             {


[07/15] git commit: [flex-asjs] [refs/heads/develop] - add clientWidth and CSSWidth so we can better compute and force sizes of containers. Absolute positioned children don't affect the bounding width so you have to set it yourself

Posted by ah...@apache.org.
add clientWidth and CSSWidth so we can better compute and force sizes of containers.  Absolute positioned children don't affect the bounding width so you have to set it yourself


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

Branch: refs/heads/develop
Commit: d2fe78afe46739bac6963a434a004bf2f03cadc1
Parents: aac09e7
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:27:36 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:11 2015 -0700

----------------------------------------------------------------------
 .../Core/js/src/org/apache/flex/core/UIBase.js  | 56 +++++++++++++++++---
 1 file changed, 48 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d2fe78af/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js b/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
index 61a0015..14c79da 100644
--- a/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/projects/Core/js/src/org/apache/flex/core/UIBase.js
@@ -424,6 +424,26 @@ Object.defineProperties(org_apache_flex_core_UIBase.prototype, {
         }
     },
     /** @expose */
+    clientWidth: {
+        /** @this {org_apache_flex_core_UIBase} */
+        get: function() {
+            return this.positioner.clientWidth;
+        }
+    },
+    /** @expose */
+    CSSWidth: {
+        /** @this {org_apache_flex_core_UIBase} */
+        get: function() {
+            var pixels;
+            var strpixels = this.positioner.style.width;
+            if (strpixels !== null && strpixels.indexOf('%') != -1)
+              pixels = NaN;
+            else
+              pixels = parseFloat(strpixels);
+            return pixels;
+        }
+    },
+    /** @expose */
     width: {
         /** @this {org_apache_flex_core_UIBase} */
         set: function(pixels) {
@@ -476,6 +496,26 @@ Object.defineProperties(org_apache_flex_core_UIBase.prototype, {
         }
     },
     /** @expose */
+    clientHeight: {
+        /** @this {org_apache_flex_core_UIBase} */
+        get: function() {
+            return this.positioner.clientHeight;
+        }
+    },
+    /** @expose */
+    CSSHeight: {
+        /** @this {org_apache_flex_core_UIBase} */
+        get: function() {
+            var pixels;
+            var strpixels = this.positioner.style.height;
+            if (strpixels !== null && strpixels.indexOf('%') != -1)
+              pixels = NaN;
+            else
+              pixels = parseFloat(strpixels);
+            return pixels;
+        }
+    },
+    /** @expose */
     height: {
         /** @this {org_apache_flex_core_UIBase} */
         set: function(pixels) {
@@ -649,8 +689,8 @@ org_apache_flex_core_UIBase.prototype.setHeight =
   if (opt_noEvent === undefined)
     opt_noEvent = false;
 
-  var _height = this.height;
-  if (_height != value) {
+  var _height = this.CSSHeight;
+  if (isNaN(_height) || _height != value) {
     this.positioner.style.height = value.toString() + 'px';
     if (!opt_noEvent)
       this.dispatchEvent('heightChanged');
@@ -669,8 +709,8 @@ org_apache_flex_core_UIBase.prototype.setWidth =
   if (opt_noEvent === undefined)
     opt_noEvent = false;
 
-  var _width = this.width;
-  if (_width != value) {
+  var _width = this.CSSWidth;
+  if (isNaN(_width) || _width != value) {
     this.positioner.style.width = value.toString() + 'px';
     if (!opt_noEvent)
       this.dispatchEvent('widthChanged');
@@ -690,14 +730,14 @@ org_apache_flex_core_UIBase.prototype.setWidthAndHeight =
   if (opt_noEvent === undefined)
     opt_noEvent = false;
 
-  var _width = this.width;
-  if (_width != newWidth) {
+  var _width = this.CSSWidth;
+  if (isNaN(_width) || _width != newWidth) {
     this.positioner.style.width = newWidth.toString() + 'px';
     if (!opt_noEvent)
       this.dispatchEvent('widthChanged');
   }
-  var _height = this.height;
-  if (_height != newHeight) {
+  var _height = this.CSSHeight;
+  if (isNaN(_height) || _height != newHeight) {
     this.positioner.style.height = newHeight.toString() + 'px';
     if (!opt_noEvent)
       this.dispatchEvent('heightChanged');


[12/15] git commit: [flex-asjs] [refs/heads/develop] - forgot to implement JS BrowserWindow class

Posted by ah...@apache.org.
forgot to implement JS BrowserWindow class


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

Branch: refs/heads/develop
Commit: cac7be7bf1549ba0f633186c35e5e2c23521f8cb
Parents: eb3eaba
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:30:34 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:12 2015 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/BrowserWindow.js   | 46 ++++++++++++++++++++
 1 file changed, 46 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cac7be7b/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js b/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js
new file mode 100644
index 0000000..029e843
--- /dev/null
+++ b/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js
@@ -0,0 +1,46 @@
+/**
+ * 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_core_BrowserWindow');
+
+
+
+/**
+ * @constructor
+ */
+org_apache_flex_core_BrowserWindow = function() {
+    org_apache_flex_core_BrowserWindow.base(this, 'constructor');
+  };
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org_apache_flex_core_BrowserWindow.prototype.FLEXJS_CLASS_INFO =
+    { names: [{ name: 'BrowserWindow',
+                qName: 'org_apache_flex_core_BrowserWindow'}]};
+
+
+/**
+ * @expose
+ * @param {string} url The url.
+ * @param {string} options The window name.
+ */
+org_apache_flex_core_BrowserWindow.open = function(url, options) {
+  Window.open(url, options);
+};
+
+


[05/15] git commit: [flex-asjs] [refs/heads/develop] - fix bug in binding

Posted by ah...@apache.org.
fix bug in binding


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

Branch: refs/heads/develop
Commit: 150811aedef7a155b7ac99b8412764232e22aa86
Parents: cb82c4f
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:25:21 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:11 2015 -0700

----------------------------------------------------------------------
 .../js/src/org/apache/flex/binding/ViewBaseDataBinding.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/150811ae/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js b/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
index b5428a6..593fd23 100644
--- a/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
+++ b/frameworks/projects/Binding/js/src/org/apache/flex/binding/ViewBaseDataBinding.js
@@ -222,8 +222,12 @@ org_apache_flex_binding_ViewBaseDataBinding.prototype.setupWatchers =
   for (i = 0; i < n; i++)
   {
     var watcher = watchers[i];
-    if (watcher.bindings.indexOf(index) != -1)
-    {
+    var isValidWatcher = false;
+    if (typeof(watcher.bindings) === 'number')
+      isValidWatcher = (watcher.bindings == index);
+    else
+      isValidWatcher = (watcher.bindings.indexOf(index) != -1);
+    if (isValidWatcher) {
       var type = watcher.type;
       switch (type)
       {
@@ -248,7 +252,7 @@ org_apache_flex_binding_ViewBaseDataBinding.prototype.setupWatchers =
       }
       if (watcher.children)
       {
-        this.setupWatchers(gb, index, watcher.children,
+        this.setupWatchers(gb, index, watcher.children.watchers,
             watcher.watcher);
       }
     }


[02/15] git commit: [flex-asjs] [refs/heads/develop] - add maxWidth/maxHeight to layout. Also switch flexibleChild to id to save binding

Posted by ah...@apache.org.
add maxWidth/maxHeight to layout.  Also switch flexibleChild to id to save binding


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

Branch: refs/heads/develop
Commit: 1fc77cb01c5ef2a2fcd287fa703e8afb64fc2c3a
Parents: 6d9672c
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:24:08 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:10 2015 -0700

----------------------------------------------------------------------
 .../FlexibleFirstChildHorizontalLayout.as       | 48 ++++++++++++-
 .../layouts/OneFlexibleChildHorizontalLayout.as | 72 +++++++++++++++++--
 .../layouts/OneFlexibleChildVerticalLayout.as   | 75 ++++++++++++++++++--
 3 files changed, 181 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1fc77cb0/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
index f374fb8..ead1dc6 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -74,6 +74,52 @@ package org.apache.flex.html.beads.layouts
             host = value as ILayoutChild;
 		}
 	
+        private var _maxWidth:Number;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#maxWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get maxWidth():Number
+        {
+            return _maxWidth;
+        }
+        
+        /**
+         *  @private 
+         */
+        public function set maxWidth(value:Number):void
+        {
+            _maxWidth = value;
+        }
+        
+        private var _maxHeight:Number;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#maxHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get maxHeight():Number
+        {
+            return _maxHeight;
+        }
+        
+        /**
+         *  @private 
+         */
+        public function set maxHeight(value:Number):void
+        {
+            _maxHeight = value;
+        }
+        
         /**
          * @copy org.apache.flex.core.IBeadLayout#layout
          */
@@ -89,7 +135,7 @@ package org.apache.flex.html.beads.layouts
 			var marginTop:Object;
 			var marginBottom:Object;
 			var margin:Object;
-			var maxHeight:Number = 0;
+			maxHeight = 0;
 			var verticalMargins:Array = [];
 			
             var xx:Number = layoutParent.resizableView.width;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1fc77cb0/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
index 761f36e..8ba9a96 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildHorizontalLayout.as
@@ -19,6 +19,7 @@
 package org.apache.flex.html.beads.layouts
 {
 	import org.apache.flex.core.IBeadLayout;
+    import org.apache.flex.core.IDocument;
 	import org.apache.flex.core.ILayoutChild;
     import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.IStrand;
@@ -42,7 +43,7 @@ package org.apache.flex.html.beads.layouts
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class OneFlexibleChildHorizontalLayout implements IBeadLayout
+	public class OneFlexibleChildHorizontalLayout implements IBeadLayout, IDocument
 	{
         /**
          *  Constructor.
@@ -58,14 +59,16 @@ package org.apache.flex.html.beads.layouts
 		
         
         /**
-         *  The flexible child
+         *  The id of the flexible child
          *  
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public var flexibleChild:IUIBase;
+        public var flexibleChild:String;
+        
+        private var actualChild:ILayoutChild;
         
         // the strand/host container is also an ILayoutChild because
         // can have its size dictated by the host's parent which is
@@ -73,6 +76,12 @@ package org.apache.flex.html.beads.layouts
         private var host:ILayoutChild;
 		
         /**
+         *  @private
+         *  The document.
+         */
+        private var document:Object;
+        
+        /**
          *  @copy org.apache.flex.core.IBead#strand
          *  
          *  @langversion 3.0
@@ -85,6 +94,52 @@ package org.apache.flex.html.beads.layouts
             host = value as ILayoutChild;
 		}
 	
+        private var _maxWidth:Number;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#maxWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get maxWidth():Number
+        {
+            return _maxWidth;
+        }
+        
+        /**
+         *  @private 
+         */
+        public function set maxWidth(value:Number):void
+        {
+            _maxWidth = value;
+        }
+        
+        private var _maxHeight:Number;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#maxHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get maxHeight():Number
+        {
+            return _maxHeight;
+        }
+        
+        /**
+         *  @private 
+         */
+        public function set maxHeight(value:Number):void
+        {
+            _maxHeight = value;
+        }
+        
         /**
          * @copy org.apache.flex.core.IBeadLayout#layout
          */
@@ -92,7 +147,8 @@ package org.apache.flex.html.beads.layouts
 		{
             var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
             var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
-			
+            actualChild = document[flexibleChild];
+
             var ilc:ILayoutChild;
 			var n:int = contentView.numElements;
 			var marginLeft:Object;
@@ -100,7 +156,7 @@ package org.apache.flex.html.beads.layouts
 			var marginTop:Object;
 			var marginBottom:Object;
 			var margin:Object;
-			var maxHeight:Number = 0;
+			maxHeight = 0;
 			var verticalMargins:Array = new Array(n);
 			
             var ww:Number = layoutParent.resizableView.width;
@@ -121,7 +177,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 == flexibleChild)
+                if (child == actualChild)
                 {
                     flexChildIndex = i;
                     break;
@@ -401,6 +457,10 @@ package org.apache.flex.html.beads.layouts
             return {paddingLeft:pl, paddingTop:pt, paddingRight:pr};
         }
 
+        public function setDocument(document:Object, id:String = null):void
+        {
+            this.document = document;	
+        }
     }
         
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1fc77cb0/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
index eb641b8..64364c8 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/layouts/OneFlexibleChildVerticalLayout.as
@@ -19,6 +19,7 @@
 package org.apache.flex.html.beads.layouts
 {
 	import org.apache.flex.core.IBeadLayout;
+    import org.apache.flex.core.IDocument;
 	import org.apache.flex.core.ILayoutChild;
     import org.apache.flex.core.ILayoutParent;
 	import org.apache.flex.core.IStrand;
@@ -42,7 +43,7 @@ package org.apache.flex.html.beads.layouts
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-	public class OneFlexibleChildVerticalLayout implements IBeadLayout
+	public class OneFlexibleChildVerticalLayout implements IBeadLayout, IDocument
 	{
         /**
          *  Constructor.
@@ -58,14 +59,16 @@ package org.apache.flex.html.beads.layouts
 		
         
         /**
-         *  The flexible child
+         *  The id of the flexible child
          *  
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion FlexJS 0.0
          */
-        public var flexibleChild:IUIBase;
+        public var flexibleChild:String;
+        
+        private var actualChild:ILayoutChild;
         
         // the strand/host container is also an ILayoutChild because
         // can have its size dictated by the host's parent which is
@@ -73,6 +76,12 @@ package org.apache.flex.html.beads.layouts
         private var host:ILayoutChild;
 		
         /**
+         *  @private
+         *  The document.
+         */
+        private var document:Object;
+        
+        /**
          *  @copy org.apache.flex.core.IBead#strand
          *  
          *  @langversion 3.0
@@ -84,7 +93,53 @@ package org.apache.flex.html.beads.layouts
 		{
             host = value as ILayoutChild;
 		}
-	        
+	       
+        private var _maxWidth:Number;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#maxWidth
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get maxWidth():Number
+        {
+            return _maxWidth;
+        }
+        
+        /**
+         *  @private 
+         */
+        public function set maxWidth(value:Number):void
+        {
+            _maxWidth = value;
+        }
+        
+        private var _maxHeight:Number;
+        
+        /**
+         *  @copy org.apache.flex.core.IBead#maxHeight
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get maxHeight():Number
+        {
+            return _maxHeight;
+        }
+        
+        /**
+         *  @private 
+         */
+        public function set maxHeight(value:Number):void
+        {
+            _maxHeight = value;
+        }
+        
         /**
          * @copy org.apache.flex.core.IBeadLayout#layout
          */
@@ -92,7 +147,8 @@ package org.apache.flex.html.beads.layouts
 		{
             var layoutParent:ILayoutParent = host.getBeadByType(ILayoutParent) as ILayoutParent;
             var contentView:IParentIUIBase = layoutParent ? layoutParent.contentView : IParentIUIBase(host);
-			
+			actualChild = document[flexibleChild];
+            
             var ilc:ILayoutChild;
 			var n:int = contentView.numElements;
 			var marginLeft:Object;
@@ -100,7 +156,7 @@ package org.apache.flex.html.beads.layouts
 			var marginTop:Object;
 			var marginBottom:Object;
 			var margin:Object;
-			var maxWidth:Number = 0;
+			maxWidth = 0;
 			var horizontalMargins:Array = new Array(n);
 			
             var hh:Number = layoutParent.resizableView.height;
@@ -121,7 +177,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 == flexibleChild)
+                if (child == actualChild)
                 {
                     flexChildIndex = i;
                     break;
@@ -401,6 +457,11 @@ package org.apache.flex.html.beads.layouts
             return {paddingLeft:pl, paddingTop:pt, paddingRight:pr};
         }
 
+        public function setDocument(document:Object, id:String = null):void
+        {
+            this.document = document;	
+        }
+        
     }
         
 }


[08/15] git commit: [flex-asjs] [refs/heads/develop] - set explicitWidth/Height so that initial view doesn't think it is sized to content

Posted by ah...@apache.org.
set explicitWidth/Height so that initial view doesn't think it is sized to content


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

Branch: refs/heads/develop
Commit: aac09e75258c7a4aae8a3c3d763bc7085606d2a3
Parents: 150811a
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:26:14 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:11 2015 -0700

----------------------------------------------------------------------
 .../projects/Core/as/src/org/apache/flex/core/Application.as     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aac09e75/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as b/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
index c44a0bb..54edeb1 100644
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
+++ b/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
@@ -143,9 +143,9 @@ package org.apache.flex.core
             {
                 initialView.applicationModel =  model;
                 if (isNaN(initialView.explicitWidth))
-                    initialView.setWidth(stage.stageWidth);
+                    initialView.width = stage.stageWidth;
                 if (isNaN(initialView.explicitHeight))
-                    initialView.setHeight(stage.stageHeight);
+                    initialView.height = stage.stageHeight;
         	    this.addElement(initialView);
                 var bgColor:Object = ValuesManager.valuesImpl.getValue(this, "background-color");
                 if (bgColor != null)


[13/15] git commit: [flex-asjs] [refs/heads/develop] - This closes #2. fix up js/bin/mxmlc

Posted by ah...@apache.org.
This closes #2.  fix up js/bin/mxmlc


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

Branch: refs/heads/develop
Commit: 885de27f4bcabc9e2fc52a8df7a7a703c2ba8fa1
Parents: 7e7fc26
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 16:00:38 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:12 2015 -0700

----------------------------------------------------------------------
 js/bin/mxmlc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/885de27f/js/bin/mxmlc
----------------------------------------------------------------------
diff --git a/js/bin/mxmlc b/js/bin/mxmlc
index ca92abb..48aede6 100755
--- a/js/bin/mxmlc
+++ b/js/bin/mxmlc
@@ -25,9 +25,9 @@
 # In Windows Command Prompt, use mxmlc.bat instead.
 #
 
+SCRIPT_HOME=`dirname $0`
 if [ "x${FALCON_HOME}" = "x" ]
 then
-    SCRIPT_HOME=`dirname $0`
     FALCON_HOME=${SCRIPT_HOME}/../..
 fi
 
@@ -67,4 +67,4 @@ fi
 
 VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
 
-java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=FLEXJS -sdk-js-lib="$FLEX_HOME/frameworks/js/FlexJS/src" "$@"
+java $VMARGS $D32 $SETUP_SH_VMARGS -Dflexcompiler="$FALCON_HOME" -Dflexlib="$FLEX_HOME/frameworks" -jar "$SCRIPT_HOME/../lib/mxmlc.jar" +flexlib="$FLEX_HOME/frameworks" -js-output-type=FLEXJS -sdk-js-lib="$FLEX_HOME/frameworks/js/FlexJS/src" "$@"


[10/15] git commit: [flex-asjs] [refs/heads/develop] - typo

Posted by ah...@apache.org.
typo


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

Branch: refs/heads/develop
Commit: 7e7fc2633709c6d8003312588821ac4fc76ce7ab
Parents: 31c980a
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 15:42:18 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:12 2015 -0700

----------------------------------------------------------------------
 .../projects/Core/js/src/org/apache/flex/core/BrowserWindow.js     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e7fc263/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js b/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js
index 029e843..9c181ea 100644
--- a/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js
+++ b/frameworks/projects/Core/js/src/org/apache/flex/core/BrowserWindow.js
@@ -40,7 +40,7 @@ org_apache_flex_core_BrowserWindow.prototype.FLEXJS_CLASS_INFO =
  * @param {string} options The window name.
  */
 org_apache_flex_core_BrowserWindow.open = function(url, options) {
-  Window.open(url, options);
+  window.open(url, options);
 };
 
 


[15/15] git commit: [flex-asjs] [refs/heads/develop] - try making more scripts executable on mac

Posted by ah...@apache.org.
try making more scripts executable on mac


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

Branch: refs/heads/develop
Commit: 3aa038b9355033be2d81d698c6c632361f9b7b86
Parents: 885de27
Author: Alex Harui <ah...@apache.org>
Authored: Fri May 22 16:03:33 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri May 22 16:04:13 2015 -0700

----------------------------------------------------------------------
 installer.xml | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3aa038b9/installer.xml
----------------------------------------------------------------------
diff --git a/installer.xml b/installer.xml
index 9720542..83ffd51 100644
--- a/installer.xml
+++ b/installer.xml
@@ -359,6 +359,14 @@
             <arg value="+x" />
             <arg value="${FLEXJS_HOME}/js/bin/compc"/>
         </exec>
+        <exec executable="chmod" dir="${FLEXJS_HOME}">
+             <arg value="+x" />
+             <arg value="${FLEXJS_HOME}/bin/mxmlc"/>
+         </exec>
+         <exec executable="chmod" dir="${FLEXJS_HOME}">
+             <arg value="+x" />
+             <arg value="${FLEXJS_HOME}/bin/compc"/>
+         </exec>
     </target>
 
     <target name="get-falcon" depends="falcon-check,falcon-get" unless="falcon.present"