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 2014/12/09 06:16:48 UTC

[01/31] git commit: [flex-asjs] [refs/heads/develop] - copy assets

Repository: flex-asjs
Updated Branches:
  refs/heads/develop 5712e6cd0 -> 43cd5b577


copy assets


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

Branch: refs/heads/develop
Commit: b2505eb07a2a2719e1eca37f6bdaf63c866c3416
Parents: 0b84dc0
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:41:31 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:39 2014 -0800

----------------------------------------------------------------------
 examples/FlexJSStore/build.xml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b2505eb0/examples/FlexJSStore/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/build.xml b/examples/FlexJSStore/build.xml
index afffb8d..ebe81dd 100644
--- a/examples/FlexJSStore/build.xml
+++ b/examples/FlexJSStore/build.xml
@@ -36,6 +36,22 @@
     <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
         <mkdir dir="${basedir}/bin-debug/data" />
         <copy file="${basedir}/src/data/catalog.json" tofile="${basedir}/bin-debug/data/catalog.json" />
+        <mkdir dir="${basedir}/bin/js-debug/data" />
+        <copy file="${basedir}/src/data/catalog.json" tofile="${basedir}/bin/js-debug/data/catalog.json" />
+        <mkdir dir="${basedir}/bin/js-release/data" />
+        <copy file="${basedir}/src/data/catalog.json" tofile="${basedir}/bin/js-release/data/catalog.json" />
+        <mkdir dir="${basedir}/bin/js-debug/assets" />
+        <copy todir="${basedir}/bin/js-debug/assets" >
+            <fileset dir="${basedir}/src">
+                <include name="assets/**" />
+            </fileset>
+        </copy>
+        <mkdir dir="${basedir}/bin/js-release/assets" />
+        <copy todir="${basedir}/bin/js-release/assets" >
+            <fileset dir="${basedir}/src">
+                <include name="assets/**" />
+            </fileset>
+        </copy>
     </target>
 
     <target name="clean">


[21/31] git commit: [flex-asjs] [refs/heads/develop] - add states and transitions

Posted by ah...@apache.org.
add states and transitions


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

Branch: refs/heads/develop
Commit: c960c42e03ac71879da272574bd2248f4b7abc0b
Parents: 9de33e2
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:33:13 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:44 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c960c42e/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index 16bbfcf..643cd29 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -32,6 +32,25 @@ org.apache.flex.core.ContainerBase = function() {
    */
   this.initialized_ = false;
 
+  /**
+   * @private
+   * @type {Array}
+   */
+  this.states_ = null;
+
+  /**
+   * @private
+   * @type {Array}
+   */
+  this.transitions_ = null;
+
+  /**
+   * @private
+   * @type {?String}
+   */
+  this.currentState_ = null;
+
+
   this.document = this;
 
 };
@@ -117,3 +136,57 @@ org.apache.flex.core.ContainerBase.prototype.setMXMLDescriptor =
 };
 
 
+/**
+ * @expose
+ * @return {Array} An array of states.
+ */
+org.apache.flex.core.ContainerBase.prototype.get_states = function() {
+  return this.states_;
+};
+
+
+/**
+ * @expose
+ * @param {Array} s An array of states.
+ */
+org.apache.flex.core.ContainerBase.prototype.set_states = function(s) {
+  this.states_ = s;
+};
+
+
+/**
+ * @expose
+ * @return {String} The current state.
+ */
+org.apache.flex.core.ContainerBase.prototype.get_currentState = function() {
+  return this.currentState_;
+};
+
+
+/**
+ * @expose
+ * @param {String} s The current state.
+ */
+org.apache.flex.core.ContainerBase.prototype.set_currentState = function(s) {
+  this.currentState_ = s;
+};
+
+
+/**
+ * @expose
+ * @return {Array} An array of states.
+ */
+org.apache.flex.core.ContainerBase.prototype.get_transitions = function() {
+  return this.transitions_;
+};
+
+
+/**
+ * @expose
+ * @param {Array} s An array of states.
+ */
+org.apache.flex.core.ContainerBase.prototype.set_transitions = function(s) {
+  this.transitions_ = s;
+};
+
+


[30/31] git commit: [flex-asjs] [refs/heads/develop] - add length property

Posted by ah...@apache.org.
add length property


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

Branch: refs/heads/develop
Commit: 22d812b6a716c704b1427b01a057115ccf0c2d0d
Parents: 6cd888b
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 20:43:36 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:29 2014 -0800

----------------------------------------------------------------------
 .../org/apache/flex/net/dataConverters/LazyCollection.js  | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22d812b6/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js b/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
index 7c42ca0..a277e1c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/dataConverters/LazyCollection.js
@@ -172,3 +172,13 @@ org.apache.flex.net.dataConverters.LazyCollection.prototype.getItemAt =
 
   return this.data_[index];
 };
+
+
+/**
+ * @expose
+ * @return {string} The number of items in the collection.
+ */
+org.apache.flex.net.dataConverters.LazyCollection.prototype.get_length =
+    function() {
+  return this.rawData ? this.rawData.length : 0;
+};


[09/31] git commit: [flex-asjs] [refs/heads/develop] - add beads when addedtoparent

Posted by ah...@apache.org.
add beads when addedtoparent


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

Branch: refs/heads/develop
Commit: a61b76cbab2630d5f57f4020593555ea0b255cb2
Parents: bdac9ea
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:46:53 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:41 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a61b76cb/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index 23d7cc8..6c95b56 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -184,6 +184,13 @@ org.apache.flex.core.UIBase.prototype.get_parent = function() {
  */
 org.apache.flex.core.UIBase.prototype.addedToParent = function() {
 
+  if (this.beads) {
+    var n = this.beads.length;
+	for (var i = 0; i < n; i++) {
+      this.addBead(this.beads[i]);
+	}
+  }
+  
   /**
    * @type {Function}
    */


[13/31] git commit: [flex-asjs] [refs/heads/develop] - fix up PropertyWatcher

Posted by ah...@apache.org.
fix up PropertyWatcher


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

Branch: refs/heads/develop
Commit: 4865ad196095b358e6fd07fa5d0ef8dceea0410b
Parents: f400813
Author: Alex Harui <ah...@apache.org>
Authored: Wed Nov 26 15:52:50 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:42 2014 -0800

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/binding/PropertyWatcher.js       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4865ad19/frameworks/js/FlexJS/src/org/apache/flex/binding/PropertyWatcher.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/PropertyWatcher.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/PropertyWatcher.js
index 670e34e..b8ced05 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/PropertyWatcher.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/PropertyWatcher.js
@@ -107,7 +107,7 @@ org.apache.flex.binding.PropertyWatcher.prototype.parentChanged =
 
   this.source = parent;
 
-  if (this.source)
+  if (this.source && typeof(this.source.addEventListener) == 'function')
     this.addEventListeners();
 
   // Now get our property.


[03/31] git commit: [flex-asjs] [refs/heads/develop] - sync up with as version

Posted by ah...@apache.org.
sync up with as version


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

Branch: refs/heads/develop
Commit: bdac9ea237db25f371d62ce35827ab89917e92fb
Parents: f690403
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:46:06 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:40 2014 -0800

----------------------------------------------------------------------
 .../apache/flex/utils/MXMLDataInterpreter.js    | 346 ++++++++++---------
 1 file changed, 176 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdac9ea2/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
index 4b9f273..03b873b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
@@ -40,7 +40,7 @@ org.apache.flex.utils.MXMLDataInterpreter.prototype.FLEXJS_CLASS_INFO =
  */
 org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject =
     function(document, data) {
-  var assingComp, Cls, comp, generateMXMLArray, generateMXMLObject, i, id, j, m,
+  var assignComp, Cls, comp, generateMXMLArray, generateMXMLObject, i, id, j, m,
       name, simple, value;
 
   i = 0;
@@ -52,39 +52,50 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject =
   generateMXMLObject =
       org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
 
-  m = data[i++]; // num props
-  for (j = 0; j < m; j++) {
-    name = data[i++];
-    simple = data[i++];
-    value = data[i++];
+  if (comp.set_strand)
+    org.apache.flex.utils.MXMLDataInterpreter.initializeStrandBasedObject(document, null, comp, data, i);
+  else {
+    m = data[i++]; // num props
+    for (j = 0; j < m; j++) {
+      name = data[i++];
+      simple = data[i++];
+      value = data[i++];
 
-    if (simple === null) {
-      value = generateMXMLArray(document, null, value);
-    } else if (simple === false) {
-      value = generateMXMLObject(document, value);
-    }
+      if (simple === null) {
+        value = generateMXMLArray(document, null, value);
+      } else if (simple === false) {
+        value = generateMXMLObject(document, value);
+      }
 
-    assingComp = true;
-    if (name === 'id') {
-      document['set_' + value](comp);
-      id = value;
-    } else if (name === '_id') {
-      document[value] = comp;
-      id = value;
-      assingComp = false;
-    }
+      if (name === 'id') {
+        document['set_' + value](comp);
+        id = value;
+      }
 
-    if (assingComp) {
-      if (typeof comp['set_' + name] === 'function') {
-        comp['set_' + name](value);
-      } else {
-        comp[name] = value;
+      if (name == 'document' && !comp.document) {
+        comp.document = document;
+      }
+      else if (name === '_id') {
+        document[value] = comp;
+        id = value;
+      }
+      else if (name === 'id') {
+        if (typeof(comp['set_id']) === 'function') {
+          comp['set_id'](value);
+        }
+      }
+      else {
+        if (typeof comp['set_' + name] === 'function') {
+          comp['set_' + name](value);
+        } else {
+          comp[name] = value;
+        }
       }
     }
-  }
 
-  if (typeof comp.setDocument === 'function') {
-    comp.setDocument(document, id);
+    if (typeof comp.setDocument === 'function') {
+      comp.setDocument(document, id);
+    }
   }
 
   return comp;
@@ -96,60 +107,64 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject =
  * @param {Object} document The MXML object.
  * @param {Object} parent The parent object.
  * @param {Array} data The data array.
- * @param {boolean=} opt_recursive Whether to create objects in children.
  * @return {Array} The generated array.
  */
 org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
-    function(document, parent, data, opt_recursive) {
-  var bead, beadOffset, beads, children, Cls, comp, comps, generateMXMLArray,
-      generateMXMLObject, i, id, j, k, l, m, n, name, self, simple, value, dispatchBeadsAdded;
+    function(document, parent, data) {
+  var comps = [];
 
-  if (opt_recursive === undefined) {
-    opt_recursive = true;
+  var n = data.length;
+  var i = 0;
+  while (i < n) {
+    var cls = data[i++];
+    var comp = new cls();
+
+    i = org.apache.flex.utils.MXMLDataInterpreter.initializeStrandBasedObject(document, parent, comp, data, i);
+
+    comps.push(comp);
   }
+  return comps;
+};
+
+
+/**
+ * @expose
+ * @param {Object} document The MXML object.
+ * @param {Object} parent The parent object.
+ * @param {Object} comp The component being initialized.
+ * @param {Array} data The data array.
+ * @param {number} i The offset into data.
+ * @return {number} The new offset into the data.
+ */
+org.apache.flex.utils.MXMLDataInterpreter.initializeStrandBasedObject =
+    function(document, parent, comp, data, i) {
+  var bead, beadOffset, beads, children, Cls, generateMXMLArray,
+      generateMXMLObject, id, j, k, l, m, n, name, self, simple, value, dispatchBeadsAdded;
 
   generateMXMLArray =
       org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
   generateMXMLObject =
       org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
 
-  comps = [];
-
-  n = data.length;
-  i = 0;
-  while (i < n) {
-    Cls = data[i++];
-    comp = new Cls();
-
-    id = null;
-    dispatchBeadsAdded = false;
-
-    m = data[i++]; // num props
-    if (m > 0 && data[0] === 'model') {
-      m--;
-      name = data[i++];
-      simple = data[i++];
-      value = data[i++];
+  id = null;
 
-      if (simple === null) {
-        value = generateMXMLArray(document, parent, value, opt_recursive);
-      } else if (simple === false) {
-        value = generateMXMLObject(document, value);
-      }
+  m = data[i++]; // num props
+  if (m > 0 && data[0] === 'model') {
+    m--;
+    name = data[i++];
+    simple = data[i++];
+    value = data[i++];
 
-      if (typeof comp['set_' + name] === 'function') {
-        comp['set_' + name](value);
-      } else {
-        comp[name] = value;
-      }
+    if (simple === null) {
+      value = generateMXMLArray(document, parent, value);
+    } else if (simple === false) {
+      value = generateMXMLObject(document, value);
+    }
 
-      // (erikdebruin) There are no components with the 'get_strand' method...
-      /*
-      if (typeof value.addBead === 'function' &&
-          typeof comp.get_strand === 'function') {
-        comp.addBead(value);
-      }
-      */
+    if (typeof comp['set_' + name] === 'function') {
+      comp['set_' + name](value);
+    } else {
+      comp[name] = value;
     }
 
     beadOffset = i + (m - 1) * 3;
@@ -158,78 +173,76 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
     } else {
       beadOffset = -1;
     }
+  }
 
-    for (j = 0; j < m; j++) {
-      name = data[i++];
-      simple = data[i++];
-      value = data[i++];
+  for (j = 0; j < m; j++) {
+    name = data[i++];
+    simple = data[i++];
+    value = data[i++];
 
-      if (simple === null) {
-        value = generateMXMLArray(document, null, value, opt_recursive);
-      } else if (simple === false) {
-        value = generateMXMLObject(document, value);
-      }
+    if (simple === null) {
+      value = generateMXMLArray(document, null, value);
+    } else if (simple === false) {
+      value = generateMXMLObject(document, value);
+    }
 
-      if (name === 'id') {
-        id = value;
-      }
+    if (name === 'id') {
+      id = value;
+      document['set_' + value](comp);
+    }
 
-      if (name === 'document' && !comp.document) {
-        comp.document = document;
-      } else if (name === '_id') {
-        id = value; // and don't assign to comp
+    if (name === 'document' && !comp.document) {
+      comp.document = document;
+    } else if (name === '_id') {
+      id = value; // and don't assign to comp
+    } else if (name === 'id') {
+      if (typeof(comp['set_id']) === 'function') {
+        comp['set_id'](value);
+      }
+    } else {
+      if (typeof(comp['set_' + name]) === 'function') {
+        comp['set_' + name](value);
       } else {
-        if (typeof(comp['set_' + name]) === 'function') {
-          comp['set_' + name](value);
-        } else {
-          comp[name] = value;
-        }
+        comp[name] = value;
       }
     }
+  }
 
-    if (beadOffset > -1)
-    {
-      name = data[i++];
-      simple = data[i++];
-      value = data[i++];
+  if (beadOffset > -1)
+  {
+    name = data[i++];
+    simple = data[i++];
+    value = data[i++];
 
-      if (simple === null) {
-        value = generateMXMLArray(document, null, value, opt_recursive);
-      } else if (simple === false) {
-        value = generateMXMLObject(document, value);
+    if (simple === null) {
+      value = generateMXMLArray(document, null, value);
+    } else if (simple === false) {
+      value = generateMXMLObject(document, value);
+    } else {
+      if (typeof(comp['set_' + name]) === 'function') {
+        comp['set_' + name](value);
       } else {
-        if (typeof(comp['set_' + name]) === 'function') {
-          comp['set_' + name](value);
-        } else {
-          comp[name] = value;
-        }
-      }
-
-      beads = value;
-      l = beads.length;
-      for (k = 0; k < l; k++) {
-        bead = beads[k];
-        comp.addBead(bead);
-        dispatchBeadsAdded = true;
+        comp[name] = value;
       }
     }
+  }
 
-    m = data[i++]; // num styles
-    for (j = 0; j < m; j++) {
-      name = data[i++];
-      simple = data[i++];
-      value = data[i++];
+  m = data[i++]; // num styles
+  for (j = 0; j < m; j++) {
+    name = data[i++];
+    simple = data[i++];
+    value = data[i++];
 
-      if (simple === null) {
-        value = generateMXMLArray(document, null, value, opt_recursive);
-      } else if (simple === false) {
-        value = generateMXMLObject(document, value);
-      }
+    if (simple === null) {
+      value = generateMXMLArray(document, null, value);
+    } else if (simple === false) {
+      value = generateMXMLObject(document, value);
+    }
 
-      if (comp.setStyle) {
-        comp.setStyle(name, value);
-      }
+    if (comp.setStyle) {
+      comp.setStyle(name, value);
     }
+  }
 
     /*
     m = data[i++]; // num effects
@@ -246,56 +259,50 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
     }
     */
 
-    m = data[i++]; // num events
-    for (j = 0; j < m; j++) {
-      name = data[i++];
-      value = data[i++];
-
-      comp.addEventListener(name, goog.bind(value, document));
-    }
-
-    if (parent) {
-      parent.addElement(comp);
-      dispatchBeadsAdded = true;
-    }
+  m = data[i++]; // num events
+  for (j = 0; j < m; j++) {
+    name = data[i++];
+    value = data[i++];
 
-    children = data[i++];
-    if (children) {
-      if (opt_recursive) {
-        self = org.apache.flex.utils.MXMLDataInterpreter;
-        self.generateMXMLInstances(
-            document, comp, children, opt_recursive);
-        if (typeof comp.childrenAdded === 'function')
-          comp.childrenAdded();
-      } else if (comp.setMXMLDescriptor) {
-        comp.setMXMLDescriptor(children);
-      }
-    }
+    comp.addEventListener(name, goog.bind(value, document));
+  }
 
-    if (id) {
-      if (typeof(document['set_' + id]) === 'function') {
-        document['set_' + id](comp);
-      } else {
-        document[id] = comp;
-      }
-    }
+  children = data[i++];
+  if (children && comp["setMXMLDescriptor"]) {
+    comp["setMXMLDescriptor"](document, children);
+  }
+  if (parent && org.apache.flex.utils.Language.is(comp,
+      org.apache.flex.core.IUIBase)) {
+    parent.addElement(comp);
+  }
 
-    if (typeof(comp.setDocument) === 'function') {
-      comp.setDocument(document, id);
+  if (children) {
+    if (!comp["setMXMLDescriptor"]) {
+      self = org.apache.flex.utils.MXMLDataInterpreter;
+      self.generateMXMLInstances(
+            document, comp, children);
+      if (typeof comp.childrenAdded === 'function')
+        comp.childrenAdded();
     }
+  }
 
-    if (goog.isFunction(comp.finalizeElement)) {
-      comp.finalizeElement();
+  if (id) {
+    if (typeof(document['set_' + id]) === 'function') {
+      document['set_' + id](comp);
+    } else {
+      document[id] = comp;
     }
+  }
 
-    comps.push(comp);
+  if (typeof(comp.setDocument) === 'function') {
+    comp.setDocument(document, id);
+  }
 
-    if (dispatchBeadsAdded) {
-      comp.dispatchEvent('beadsAdded');
-    }
+  if (goog.isFunction(comp.finalizeElement)) {
+    comp.finalizeElement();
   }
 
-  return comps;
+  return i;
 };
 
 
@@ -304,13 +311,12 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
  * @param {Object} document The MXML object.
  * @param {Object} parent The parent object.
  * @param {Array} data The data array.
- * @param {boolean=} opt_recursive Whether to create objects in children.
  */
 org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances =
-    function(document, parent, data, opt_recursive) {
+    function(document, parent, data) {
   if (data) {
     org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray(
-        document, parent, data, opt_recursive);
+        document, parent, data);
   }
 };
 
@@ -351,7 +357,7 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties =
     value = data[i++];
 
     if (simple === null) {
-      value = generateMXMLArray(host, null, value, true);
+      value = generateMXMLArray(host, null, value);
     } else if (simple === false) {
       value = generateMXMLObject(host, value);
     }
@@ -377,7 +383,7 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties =
     value = data[i++];
 
     if (simple === null) {
-      value = generateMXMLArray(host, null, value, true);
+      value = generateMXMLArray(host, null, value);
     } else if (simple === false) {
       value = generateMXMLObject(host, value);
     } else {
@@ -403,7 +409,7 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties =
     value = data[i++];
 
     if (simple === null) {
-      value = generateMXMLArray(host, null, value, true);
+      value = generateMXMLArray(host, null, value);
     } else if (simple === false) {
       value = generateMXMLObject(host, value);
     }


[16/31] git commit: [flex-asjs] [refs/heads/develop] - move some beads out of flex-flash-only

Posted by ah...@apache.org.
move some beads out of flex-flash-only


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

Branch: refs/heads/develop
Commit: 7498b6f1475348e355c91bcd8611ab511897a40e
Parents: 2407811
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:27:33 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:43 2014 -0800

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/defaults.css | 26 +++++++++++------------
 1 file changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7498b6f1/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index 5d656ea..5ae03de 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -94,6 +94,18 @@ Container
     IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
 }
 
+HContainer
+{
+    IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout");
+}
+
+VContainer
+{
+    IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualVerticalLayout");
+}
+
 List
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
@@ -218,20 +230,6 @@ Container
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
 }
 
-HContainer
-{
-    IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
-    iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout");
-}
-
-VContainer
-{
-    IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
-    iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-    IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualVerticalLayout");
-}
-
 ControlBar
 {
     IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout");


[17/31] git commit: [flex-asjs] [refs/heads/develop] - add lint target

Posted by ah...@apache.org.
add lint target


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

Branch: refs/heads/develop
Commit: bb352f9f83b8cfaf77812f0b386aaa2722f64d22
Parents: 7498b6f
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:28:33 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:43 2014 -0800

----------------------------------------------------------------------
 frameworks/js/build.xml | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bb352f9f/frameworks/js/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/build.xml b/frameworks/js/build.xml
index 9754f16..ebd6cd9 100644
--- a/frameworks/js/build.xml
+++ b/frameworks/js/build.xml
@@ -85,6 +85,8 @@
     
     <target name="compile" depends="flexjsjx, gjslint, jshint" description="Validates JS code" />
     
+    <target name="lint" depends="gjslint, jshint" />
+    
     <target name="gjslint" unless="no.lint">
         <echo>running gjslint</echo>
         <exec executable="${gjslint}" dir="${basedir}" failonerror="true">


[22/31] git commit: [flex-asjs] [refs/heads/develop] - don't think we need strands here

Posted by ah...@apache.org.
don't think we need strands here


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

Branch: refs/heads/develop
Commit: 61e68227cc7422dbb91f616fc6353ae5b76b2258
Parents: c960c42
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:35:02 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:44 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/core/HTMLElementWrapper.js      | 12 ------------
 1 file changed, 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/61e68227/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
index d07ab9d..79a4e76 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -130,18 +130,6 @@ org.apache.flex.core.HTMLElementWrapper.prototype.removeBead = function(bead) {
 
 
 /**
- * @expose
- * @param {Array.<Object>} value The new strand.
- */
-org.apache.flex.core.HTMLElementWrapper.prototype.set_strand =
-    function(value) {
-  if (this.strand !== value) {
-    this.strand = value;
-  }
-};
-
-
-/**
  * Hack to allow event.target expressions to work
  *
  * @expose


[19/31] git commit: [flex-asjs] [refs/heads/develop] - lint

Posted by ah...@apache.org.
lint


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

Branch: refs/heads/develop
Commit: 2407811a927875cff0272e2ac22700d68c423adf
Parents: e02fff0
Author: Alex Harui <ah...@apache.org>
Authored: Wed Nov 26 15:57:14 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:43 2014 -0800

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/ContainerBase.js   | 10 +++++-----
 frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js   |  6 +++---
 frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js |  6 +++---
 .../js/FlexJS/src/org/apache/flex/utils/Language.js       |  2 +-
 .../src/org/apache/flex/utils/MXMLDataInterpreter.js      |  6 +++---
 5 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2407811a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index eed7204..16bbfcf 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -31,7 +31,7 @@ org.apache.flex.core.ContainerBase = function() {
    * @type {boolean}
    */
   this.initialized_ = false;
-  
+
   this.document = this;
 
 };
@@ -74,14 +74,14 @@ org.apache.flex.core.ContainerBase.prototype.FLEXJS_CLASS_INFO =
  */
 org.apache.flex.core.ContainerBase.prototype.addedToParent = function() {
   org.apache.flex.core.ContainerBase.base(this, 'addedToParent');
-  
+
   if (!this.initialized_) {
     org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this.document,
-	    this, this.get_MXMLDescriptor());
+        this, this.get_MXMLDescriptor());
 
     this.dispatchEvent('initBindings');
     this.dispatchEvent('initComplete');
-	this.initialized_ = true;
+    this.initialized_ = true;
   }
   this.dispatchEvent('childrenAdded');
 };
@@ -114,6 +114,6 @@ org.apache.flex.core.ContainerBase.prototype.setMXMLDescriptor =
     function(doc, desc) {
   this.mxmlDescriptor = desc;
   this.document = doc;
-}
+};
 
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2407811a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index 6c95b56..dc8f649 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -186,11 +186,11 @@ org.apache.flex.core.UIBase.prototype.addedToParent = function() {
 
   if (this.beads) {
     var n = this.beads.length;
-	for (var i = 0; i < n; i++) {
+    for (var i = 0; i < n; i++) {
       this.addBead(this.beads[i]);
-	}
+    }
   }
-  
+
   /**
    * @type {Function}
    */

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2407811a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
index 17cf1bc..432b810 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -54,7 +54,7 @@ org.apache.flex.core.ViewBase = function() {
    * @type {boolean}
    */
   this.initialized_ = false;
-  
+
   this.document = this;
 
 };
@@ -111,7 +111,7 @@ org.apache.flex.core.ViewBase.prototype.setMXMLDescriptor =
     function(doc, desc) {
   this.MXMLDescriptor = desc;
   this.document = doc;
-}
+};
 
 
 /**
@@ -125,7 +125,7 @@ org.apache.flex.core.ViewBase.prototype.addedToParent = function() {
     org.apache.flex.core.ValuesManager.valuesImpl.init(this);
   }
 
-  org.apache.flex.core.ViewBase.base(this, 'addedToParent')
+  org.apache.flex.core.ViewBase.base(this, 'addedToParent');
 
   if (!this.initialized_) {
     org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this.document,

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2407811a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index 5c5d9a0..f29433d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -126,7 +126,7 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand) {
     return rightOperand === Number;
   if (rightOperand === Array && Array.isArray(leftOperand))
     return true;
-  if (leftOperand.FLEXJS_CLASS_INFO == undefined)
+  if (leftOperand.FLEXJS_CLASS_INFO === undefined)
     return false; // could be a function but not an instance
   if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
     if (checkInterfaces(leftOperand)) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2407811a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
index 03b873b..42c7fd0 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
@@ -268,8 +268,8 @@ org.apache.flex.utils.MXMLDataInterpreter.initializeStrandBasedObject =
   }
 
   children = data[i++];
-  if (children && comp["setMXMLDescriptor"]) {
-    comp["setMXMLDescriptor"](document, children);
+  if (children && comp['setMXMLDescriptor']) {
+    comp['setMXMLDescriptor'](document, children);
   }
   if (parent && org.apache.flex.utils.Language.is(comp,
       org.apache.flex.core.IUIBase)) {
@@ -277,7 +277,7 @@ org.apache.flex.utils.MXMLDataInterpreter.initializeStrandBasedObject =
   }
 
   if (children) {
-    if (!comp["setMXMLDescriptor"]) {
+    if (!comp['setMXMLDescriptor']) {
       self = org.apache.flex.utils.MXMLDataInterpreter;
       self.generateMXMLInstances(
             document, comp, children);


[06/31] git commit: [flex-asjs] [refs/heads/develop] - fix this pointer

Posted by ah...@apache.org.
fix this pointer


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

Branch: refs/heads/develop
Commit: 3dec3b03af949b581ed8dbcb49872c6a2e5623ff
Parents: b2505eb
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:42:43 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:40 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3dec3b03/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js b/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
index 5b9c20c..afdbfff 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
@@ -71,7 +71,7 @@ org.apache.flex.core.CallLaterBead.prototype.callLater =
   else
     this.calls_.push({thisArg: opt_thisArg, fn: fn, args: opt_args });
 
-  window.setTimeout(this.callback, 0);
+  window.setTimeout(goog.bind(this.callback, this), 0);
 };
 
 


[05/31] git commit: [flex-asjs] [refs/heads/develop] - MXML containers are their own document

Posted by ah...@apache.org.
MXML containers are their own document


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

Branch: refs/heads/develop
Commit: f5c4df7a7f760c6eec46a7cbeeef8afd86b6a300
Parents: 3dec3b0
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:43:43 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:40 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/core/ContainerBase.js   | 36 +++++++++++++++++---
 1 file changed, 32 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5c4df7a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index 50212ac..eed7204 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -25,6 +25,15 @@ goog.require('org.apache.flex.core.UIBase');
 org.apache.flex.core.ContainerBase = function() {
   this.mxmlProperties = null;
   org.apache.flex.core.ContainerBase.base(this, 'constructor');
+
+  /**
+   * @private
+   * @type {boolean}
+   */
+  this.initialized_ = false;
+  
+  this.document = this;
+
 };
 goog.inherits(org.apache.flex.core.ContainerBase,
     org.apache.flex.core.UIBase);
@@ -65,10 +74,15 @@ org.apache.flex.core.ContainerBase.prototype.FLEXJS_CLASS_INFO =
  */
 org.apache.flex.core.ContainerBase.prototype.addedToParent = function() {
   org.apache.flex.core.ContainerBase.base(this, 'addedToParent');
-  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, this, this.get_MXMLDescriptor());
-
-  this.dispatchEvent('initBindings');
-  this.dispatchEvent('initComplete');
+  
+  if (!this.initialized_) {
+    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this.document,
+	    this, this.get_MXMLDescriptor());
+
+    this.dispatchEvent('initBindings');
+    this.dispatchEvent('initComplete');
+	this.initialized_ = true;
+  }
   this.dispatchEvent('childrenAdded');
 };
 
@@ -89,3 +103,17 @@ org.apache.flex.core.ContainerBase.prototype.generateMXMLAttributes = function(d
 org.apache.flex.core.ContainerBase.prototype.get_MXMLDescriptor = function() {
   return this.mxmlDescriptor;
 };
+
+
+/**
+ * @expose
+ * @param {Object} doc The document.
+ * @param {Array} desc The descriptor data;
+ */
+org.apache.flex.core.ContainerBase.prototype.setMXMLDescriptor =
+    function(doc, desc) {
+  this.mxmlDescriptor = desc;
+  this.document = doc;
+}
+
+


[24/31] git commit: [flex-asjs] [refs/heads/develop] - fix more binding scenarios

Posted by ah...@apache.org.
fix more binding scenarios


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

Branch: refs/heads/develop
Commit: a5007606f8ed0b4111d7e171633f6017e3dde4c8
Parents: b9140b3
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:39:42 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:28 2014 -0800

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a5007606/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js
index 52bc5b8..e9c2be9 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBaseDataBinding.js
@@ -19,6 +19,7 @@ goog.require('org.apache.flex.binding.GenericBinding');
 goog.require('org.apache.flex.binding.PropertyWatcher');
 goog.require('org.apache.flex.binding.SimpleBinding');
 goog.require('org.apache.flex.events.Event');
+goog.require('org.apache.flex.events.ValueChangeEvent');
 
 
 
@@ -134,7 +135,7 @@ org.apache.flex.core.ViewBaseDataBinding.prototype.initCompleteHandler =
               this.deferredBindings[prop] =
                   sb;
               this.strand_.addEventListener('valueChange',
-                  this.deferredBindingsHandler);
+                  goog.bind(this.deferredBindingsHandler, this));
             }
           }
           else if (fieldWatcher.eventNames == null)
@@ -341,7 +342,7 @@ org.apache.flex.core.ViewBaseDataBinding.prototype.decodeWatcher =
 
 /**
  * @protected
- * @param {Object} event The event.
+ * @param {org.apache.flex.events.ValueChangeEvent} event The event.
  */
 org.apache.flex.core.ViewBaseDataBinding.prototype.deferredBindingsHandler =
     function(event) {
@@ -349,6 +350,7 @@ org.apache.flex.core.ViewBaseDataBinding.prototype.deferredBindingsHandler =
   var destination;
   for (p in this.deferredBindings)
   {
+    if (p != event.propertyName) continue;
     if (typeof(this.strand_['get_' + p]) == 'function')
     {
       destination = this.strand_['get_' + p]();


[23/31] git commit: [flex-asjs] [refs/heads/develop] - add percent/explicit/set_ functions. Also styles, mxml beads

Posted by ah...@apache.org.
add percent/explicit/set_ functions. Also styles, mxml beads


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

Branch: refs/heads/develop
Commit: 937d463780b054cd0ccdd3934eb9ca4aba76b209
Parents: 5a0b3b9
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:37:21 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:28 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/937d4637/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index dc8f649..c5c9204 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -21,6 +21,7 @@ goog.require('org.apache.flex.core.IBeadModel');
 goog.require('org.apache.flex.core.IBeadView');
 goog.require('org.apache.flex.core.ILayoutChild');
 goog.require('org.apache.flex.core.IParentIUIBase');
+goog.require('org.apache.flex.core.IStyleableObject');
 goog.require('org.apache.flex.core.IUIBase');
 goog.require('org.apache.flex.core.ValuesManager');
 
@@ -42,6 +43,44 @@ org.apache.flex.core.UIBase = function() {
    */
   this.lastDisplay_ = '';
 
+  /**
+   * @private
+   * @type {number}
+   */
+  this.explicitWidth_ = NaN;
+
+  /**
+   * @private
+   * @type {number}
+   */
+  this.explicitHeight_ = NaN;
+
+
+  /**
+   * @private
+   * @type {number}
+   */
+  this.percentWidth_ = NaN;
+
+
+  /**
+   * @private
+   * @type {number}
+   */
+  this.percentHeight_ = NaN;
+
+  /**
+   * @private
+   * @type {Array.<Object>}
+   */
+  this.mxmlBeads_ = null;
+
+  /**
+   * @private
+   * @type {Object}
+   */
+  this.style_ = null;
+
   this.createElement();
 };
 goog.inherits(org.apache.flex.core.UIBase,
@@ -58,7 +97,17 @@ org.apache.flex.core.UIBase.prototype.FLEXJS_CLASS_INFO =
                 qName: 'org.apache.flex.core.UIBase' }],
       interfaces: [org.apache.flex.core.IUIBase,
                    org.apache.flex.core.IParentIUIBase,
-                   org.apache.flex.core.ILayoutChild] };
+                   org.apache.flex.core.ILayoutChild,
+                   org.apache.flex.core.IStyleableObject] };
+
+
+/**
+ * @expose
+ * @param {Array.<Object>} value The list of beads from MXML.
+ */
+org.apache.flex.core.UIBase.prototype.set_beads = function(value) {
+  this.mxmlBeads_ = value;
+};
 
 
 /**
@@ -184,10 +233,14 @@ org.apache.flex.core.UIBase.prototype.get_parent = function() {
  */
 org.apache.flex.core.UIBase.prototype.addedToParent = function() {
 
-  if (this.beads) {
-    var n = this.beads.length;
+  var styles = this.get_style();
+  if (styles)
+    org.apache.flex.core.ValuesManager.valuesImpl.applyStyles(this, styles);
+
+  if (this.mxmlBeads_) {
+    var n = this.mxmlBeads_.length;
     for (var i = 0; i < n; i++) {
-      this.addBead(this.beads[i]);
+      this.addBead(this.mxmlBeads_[i]);
     }
   }
 
@@ -376,8 +429,8 @@ org.apache.flex.core.UIBase.prototype.get_y = function() {
  * @param {number} pixels The pixel count from the left edge.
  */
 org.apache.flex.core.UIBase.prototype.set_width = function(pixels) {
-  this.positioner.style.width = pixels.toString() + 'px';
-  this.dispatchEvent('widthChanged');
+  this.set_explicitWidth(pixels);
+  this.setWidth(pixels);
 };
 
 
@@ -397,11 +450,52 @@ org.apache.flex.core.UIBase.prototype.get_width = function() {
 
 /**
  * @expose
+ * @param {number} pixels The pixel count from the left edge.
+ */
+org.apache.flex.core.UIBase.prototype.set_explicitWidth = function(pixels) {
+  this.explicitWidth_ = pixels;
+  if (!isNaN(pixels))
+    this.percentWidth_ = NaN;
+};
+
+
+/**
+ * @expose
+ * @return {number} The width of the object in pixels.
+ */
+org.apache.flex.core.UIBase.prototype.get_explicitWidth = function() {
+  return this.explicitWidth_;
+};
+
+
+/**
+ * @expose
+ * @param {number} pixels The percent width of the object.
+ */
+org.apache.flex.core.UIBase.prototype.set_percentWidth = function(pixels) {
+  this.percentWidth_ = pixels;
+  this.positioner.style.width = pixels.toString() + '%';
+  if (!isNaN(pixels))
+    this.explicitWidth_ = NaN;
+};
+
+
+/**
+ * @expose
+ * @return {number} The percent width of the object.
+ */
+org.apache.flex.core.UIBase.prototype.get_percentWidth = function() {
+  return this.percentWidth_;
+};
+
+
+/**
+ * @expose
  * @param {number} pixels The pixel count from the top edge.
  */
 org.apache.flex.core.UIBase.prototype.set_height = function(pixels) {
-  this.positioner.style.height = pixels.toString() + 'px';
-  this.dispatchEvent('heightChanged');
+  this.set_explicitHeight(pixels);
+  this.setHeight(pixels);
 };
 
 
@@ -421,6 +515,135 @@ org.apache.flex.core.UIBase.prototype.get_height = function() {
 
 /**
  * @expose
+ * @param {number} pixels The height of the object in pixels.
+ */
+org.apache.flex.core.UIBase.prototype.set_explicitHeight = function(pixels) {
+  this.explicitHeight_ = pixels;
+  if (!isNaN(pixels))
+    this.percentHeight_ = NaN;
+};
+
+
+/**
+ * @expose
+ * @return {number} The height of the object in pixels.
+ */
+org.apache.flex.core.UIBase.prototype.get_explicitHeight = function() {
+  return this.explicitHeight_;
+};
+
+
+/**
+ * @expose
+ * @param {number} pixels The percentage height.
+ */
+org.apache.flex.core.UIBase.prototype.set_percentHeight = function(pixels) {
+  this.percentHeight_ = pixels;
+  this.positioner.style.height = pixels.toString() + '%';
+  if (!isNaN(pixels))
+    this.explicitHeight_ = NaN;
+};
+
+
+/**
+ * @expose
+ * @return {number} The percentage height of the object.
+ */
+org.apache.flex.core.UIBase.prototype.get_percentHeight = function() {
+  return this.percentHeight_;
+};
+
+
+/**
+ * @expose
+ * @param {number} value The height of the object in pixels.
+ * @param {boolean=} opt_noEvent Whether to skip sending a change event.
+ */
+org.apache.flex.core.UIBase.prototype.setHeight =
+    function(value, opt_noEvent)
+{
+  if (opt_noEvent === undefined)
+    opt_noEvent = false;
+
+  var _height = this.get_height();
+  if (_height != value) {
+    this.positioner.style.height = value.toString() + 'px';
+    if (!opt_noEvent)
+      this.dispatchEvent('heightChanged');
+  }
+};
+
+
+/**
+ * @expose
+ * @param {number} value The width of the object in pixels.
+ * @param {boolean=} opt_noEvent Whether to skip sending a change event.
+ */
+org.apache.flex.core.UIBase.prototype.setWidth =
+    function(value, opt_noEvent)
+{
+  if (opt_noEvent === undefined)
+    opt_noEvent = false;
+
+  var _width = this.get_width();
+  if (_width != value) {
+    this.positioner.style.width = value.toString() + 'px';
+    if (!opt_noEvent)
+      this.dispatchEvent('widthChanged');
+  }
+};
+
+
+/**
+ * @expose
+ * @param {number} newWidth The width of the object in pixels.
+ * @param {number} newHeight The height of the object in pixels.
+ * @param {boolean=} opt_noEvent Whether to skip sending a change event.
+ */
+org.apache.flex.core.UIBase.prototype.setWidthAndHeight =
+    function(newWidth, newHeight, opt_noEvent)
+{
+  if (opt_noEvent === undefined)
+    opt_noEvent = false;
+
+  var _width = this.get_width();
+  if (_width != newWidth) {
+    this.positioner.style.width = newWidth.toString() + 'px';
+    if (!opt_noEvent)
+      this.dispatchEvent('widthChanged');
+  }
+  var _height = this.get_height();
+  if (_height != newHeight) {
+    this.positioner.style.height = newHeight.toString() + 'px';
+    if (!opt_noEvent)
+      this.dispatchEvent('heightChanged');
+  }
+  this.dispatchEvent('sizeChanged');
+};
+
+
+/**
+ * @expose
+ * @return {boolean} True if width sized to content.
+ */
+org.apache.flex.core.UIBase.prototype.isWidthSizedToContent = function()
+{
+  return (isNaN(this.explicitWidth_) && isNaN(this.percentWidth_));
+};
+
+
+/**
+ * @expose
+ * @return {boolean} True if height sized to content.
+ */
+org.apache.flex.core.UIBase.prototype.isHeightSizedToContent = function()
+{
+  return (isNaN(this.explicitHeight_) && isNaN(this.percentHeight_));
+};
+
+
+/**
+ * @expose
  * @type {string}
  */
 org.apache.flex.core.UIBase.prototype.id = '';
@@ -521,6 +744,29 @@ org.apache.flex.core.UIBase.prototype.set_model = function(value) {
 
 /**
  * @expose
+ * @return {Object} The style properties.
+ */
+org.apache.flex.core.UIBase.prototype.get_style = function() {
+  return this.style_;
+};
+
+
+/**
+ * @expose
+ * @param {Object} value The new style properties.
+ */
+org.apache.flex.core.UIBase.prototype.set_style = function(value) {
+  if (this.style_ !== value) {
+    if (typeof(value) == 'string')
+      value = org.apache.flex.core.ValuesManager.valuesImpl.parseStyles(value);
+    this.style_ = value;
+    this.dispatchEvent('stylesChanged');
+  }
+};
+
+
+/**
+ * @expose
  * @return {boolean} True if visible.
  */
 org.apache.flex.core.UIBase.prototype.get_visible = function() {


[29/31] git commit: [flex-asjs] [refs/heads/develop] - JS layout has to propagate sizeChanged events

Posted by ah...@apache.org.
JS layout has to propagate sizeChanged events


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

Branch: refs/heads/develop
Commit: 7e97921cd2162397f206290ac8923237831e9092
Parents: 3ad5889
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 18:03:48 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:29 2014 -0800

----------------------------------------------------------------------
 .../html/beads/layouts/NonVirtualBasicLayout.js | 77 +++++++++++++++++++-
 .../beads/layouts/NonVirtualHorizontalLayout.js | 55 +++++++++++---
 .../beads/layouts/NonVirtualVerticalLayout.js   | 50 +++++++++++--
 3 files changed, 159 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e97921c/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
index cc0d36c..814394e 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
@@ -15,6 +15,9 @@
 goog.provide('org.apache.flex.html.beads.layouts.NonVirtualBasicLayout');
 
 goog.require('org.apache.flex.core.IBeadLayout');
+goog.require('org.apache.flex.core.ILayoutChild');
+goog.require('org.apache.flex.core.ValuesManager');
+goog.require('org.apache.flex.utils.Language');
 
 
 
@@ -48,17 +51,83 @@ org.apache.flex.html.beads.layouts.NonVirtualBasicLayout.
     prototype.set_strand = 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));
+    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_.get_explicitWidth()) &&
+          !isNaN(this.strand_.get_explicitHeight()))
+          this.addOtherListeners();
+    }
   }
 };
 
 
 /**
+ *
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicLayout.
+    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.NonVirtualBasicLayout.
+    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.NonVirtualBasicLayout.
     prototype.changeHandler = function(event) {
+  var i, n, h, w;
+
+  var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent);
+  var contentView = viewBead.get_contentView();
+  w = contentView.get_width();
+  h = contentView.get_height();
+  n = contentView.get_numElements();
+  for (i = 0; i < n; i++) {
+    var child = contentView.getElementAt(i);
+    var left = org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'left');
+    var right = org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'right');
+    var top = org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'top');
+    var bottom = org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'bottom');
+
+    if (!isNaN(left)) {
+      child.positioner.style.position = 'absolute';
+      child.positioner.style.left = left.toString() + 'px';
+    }
+    if (!isNaN(top)) {
+      child.positioner.style.position = 'absolute';
+      child.positioner.style.top = top.toString() + 'px';
+    }
+    if (!isNaN(right)) {
+      child.positioner.style.position = 'absolute';
+      child.positioner.style.right = right.toString() + 'px';
+    }
+    if (!isNaN(bottom)) {
+      child.positioner.style.position = 'absolute';
+      child.positioner.style.bottom = bottom.toString() + 'px';
+    }
+    child.dispatchEvent('sizeChanged');
+  }
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e97921c/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
index c52d458..320985d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
@@ -51,21 +51,50 @@ org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout.
     function(value) {
   if (this.strand_ !== value) {
     this.strand_ = value;
-    this.strand_.addEventListener('childrenAdded',
-        goog.bind(this.changeHandler, this));
-    this.strand_.addEventListener('itemsCreated',
-                                  goog.bind(this.changeHandler, this));
-    this.strand_.addEventListener('elementAdded',
-                                  goog.bind(this.changeHandler, this));
+    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_.get_explicitWidth()) &&
+          !isNaN(this.strand_.get_explicitHeight()))
+          this.addOtherListeners();
+    }
     this.strand_.element.style.display = 'block';
-
-    this.changeHandler(null);
   }
 };
 
 
 /**
-          NonVirtualHorizontalLayout}
+ *
+ */
+org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout.
+    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.NonVirtualHorizontalLayout.
+    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.NonVirtualHorizontalLayout.
@@ -76,9 +105,11 @@ org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout.
   n = children.length;
   for (i = 0; i < n; i++)
   {
-    if (children[i].style.display == 'none')
-      children[i].lastDisplay_ = 'inline-block';
+    var child = children[i];
+    if (child.style.display == 'none')
+      child.lastDisplay_ = 'inline-block';
     else
-      children[i].style.display = 'inline-block';
+      child.style.display = 'inline-block';
+    child.flexjs_wrapper.dispatchEvent('sizeChanged');
   }
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e97921c/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
index 1828677..69e3362 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
@@ -48,15 +48,49 @@ org.apache.flex.html.beads.layouts.NonVirtualVerticalLayout.
     prototype.set_strand = 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));
+    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_.get_explicitWidth()) &&
+          !isNaN(this.strand_.get_explicitHeight()))
+          this.addOtherListeners();
+    }
   }
 };
 
 
 /**
+ *
+ */
+org.apache.flex.html.beads.layouts.NonVirtualVerticalLayout.
+    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.NonVirtualVerticalLayout.
+    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.NonVirtualVerticalLayout.
@@ -67,10 +101,12 @@ org.apache.flex.html.beads.layouts.NonVirtualVerticalLayout.
   n = children.length;
   for (i = 0; i < n; i++)
   {
-    if (children[i].style.display === 'none') {
-      children[i].lastDisplay_ = 'block';
+    var child = children[i];
+    if (child.style.display === 'none') {
+      child.lastDisplay_ = 'block';
     } else {
-      children[i].style.display = 'block';
+      child.style.display = 'block';
     }
+    child.flexjs_wrapper.dispatchEvent('sizeChanged');
   }
 };


[25/31] git commit: [flex-asjs] [refs/heads/develop] - use getter

Posted by ah...@apache.org.
use getter


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

Branch: refs/heads/develop
Commit: b9140b3e91c6f85716fff3a2d04df9ceedc4a85d
Parents: 937d463
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:38:32 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:28 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b9140b3e/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
index 432b810..17997cf 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -129,7 +129,7 @@ org.apache.flex.core.ViewBase.prototype.addedToParent = function() {
 
   if (!this.initialized_) {
     org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this.document,
-      this, this.MXMLDescriptor);
+      this, this.get_MXMLDescriptor());
 
     this.dispatchEvent(new org.apache.flex.events.Event('initBindings'));
     this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));


[11/31] git commit: [flex-asjs] [refs/heads/develop] - handle string tests

Posted by ah...@apache.org.
handle string tests


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

Branch: refs/heads/develop
Commit: 2e593054a1f4e301580a22362ff777879ae1db93
Parents: a61b76c
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:47:18 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:41 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2e593054/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index 19e9aa6..5c5d9a0 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -120,11 +120,14 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand) {
       (leftOperand instanceof /** @type {Object} */(rightOperand))) {
     return true;
   }
+  if (typeof leftOperand === 'string')
+    return false; // right was not String otherwise exit above
   if (typeof leftOperand === 'number')
     return rightOperand === Number;
   if (rightOperand === Array && Array.isArray(leftOperand))
     return true;
-
+  if (leftOperand.FLEXJS_CLASS_INFO == undefined)
+    return false; // could be a function but not an instance
   if (leftOperand.FLEXJS_CLASS_INFO.interfaces) {
     if (checkInterfaces(leftOperand)) {
       return true;


[12/31] git commit: [flex-asjs] [refs/heads/develop] - copied too much code from another class

Posted by ah...@apache.org.
copied too much code from another 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/e02fff0e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e02fff0e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e02fff0e

Branch: refs/heads/develop
Commit: e02fff0e92badb1623da3230f71aa4764e606944
Parents: 4865ad1
Author: Alex Harui <ah...@apache.org>
Authored: Wed Nov 26 15:56:58 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:42 2014 -0800

----------------------------------------------------------------------
 .../NonVirtualVerticalScrollingLayout.js        | 42 --------------------
 1 file changed, 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e02fff0e/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
index 4ae20b8..c1068ec 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalScrollingLayout.js
@@ -49,47 +49,5 @@ org.apache.flex.html.beads.layouts.
     NonVirtualVerticalScrollingLayout.prototype.set_strand = function(value) {
   if (this.strand_ !== value) {
     this.strand_ = value;
-    this.strand_.addEventListener('childrenAdded',
-        goog.bind(this.changeHandler, this));
-    this.strand_.addEventListener('itemsCreated',
-        goog.bind(this.changeHandler, this));
-    this.strand_.addEventListener('widthChanged',
-        goog.bind(this.changeHandler, this));
-    this.strand_.addEventListener('heightChanged',
-        goog.bind(this.changeHandler, this));
-  }
-};
-
-
-/**
- * @param {org.apache.flex.events.Event} event The text getter.
- */
-org.apache.flex.html.beads.layouts.
-    NonVirtualVerticalScrollingLayout.prototype.changeHandler =
-        function(event) {
-  var layoutParent = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent);
-  var contentView = layoutParent.get_contentView();
-  var selectionModel = this.strand_.get_model();
-  var dp = selectionModel.get_dataProvider();
-
-  var itemRendererFactory = this.strand_.getBeadByType(org.apache.flex.core.IItemRendererClassFactory);
-
-  var n = dp.length;
-  var yy = 0;
-  var defaultWidth = contentView.get_width();
-
-  for (var i = 0; i < n; i++)
-  {
-    var ir = contentView.getItemRendererForIndex(i);
-    if (ir == null) {
-      ir = itemRendererFactory.createItemRenderer(contentView);
-    }
-    ir.set_index(i);
-    ir.set_labelField(this.strand_.get_labelField());
-    ir.set_y(yy);
-    ir.set_x(0);
-    ir.set_width(defaultWidth);
-    ir.set_data(dp[i]);
-    yy += ir.get_height();
   }
 };


[04/31] git commit: [flex-asjs] [refs/heads/develop] - fix logic

Posted by ah...@apache.org.
fix logic


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

Branch: refs/heads/develop
Commit: f6904033e208786967fd4bd5f3a1180326e250e1
Parents: 840685e
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:45:47 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:40 2014 -0800

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f6904033/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
index 27af8d3..9639afe 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
@@ -85,14 +85,14 @@ org.apache.flex.html.ToggleTextButton.prototype.set_selected =
   if (this.selected_ != value) {
     this.selected_ = value;
 
-    var className = this.strand.className;
+    var className = this.className;
     if (value) {
       if (className.indexOf(this.SELECTED) == className.length - this.SELECTED.length)
-        this.strand.className = className.substring(0, className.length - this.SELECTED.length);
+        this.set_className(className.substring(0, className.length - this.SELECTED.length));
     }
     else {
       if (className.indexOf(this.SELECTED) == -1)
-        this.strand.className += this.SELECTED;
+        this.set_className(className + this.SELECTED);
     }
 
   }


[18/31] git commit: [flex-asjs] [refs/heads/develop] - fix binding bugs

Posted by ah...@apache.org.
fix binding bugs


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

Branch: refs/heads/develop
Commit: 9de33e2495b34ef4af30c6d4b6668927ff47d374
Parents: bb352f9
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:31:56 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:43 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/binding/BindingBase.js  | 31 +++++++++++++++-----
 .../org/apache/flex/binding/SimpleBinding.js    | 25 ++++++++++++++--
 2 files changed, 46 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9de33e24/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
index 77a303d..51ba089 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
@@ -82,13 +82,12 @@ org.apache.flex.binding.BindingBase.prototype.sourceID = null;
 org.apache.flex.binding.BindingBase.prototype.set_strand = function(value) {
   if (this.destination == null)
     this.destination = value;
-
-  if (this.sourceID != null)
-  {
-    try {
-      this.source = this.document['get_' + this.sourceID]();
-    } catch (e) {
-      this.source = this.document[this.sourceID];
+  if (this.sourceID != null) {
+    this.source = this.document[this.sourceID];
+    if (this.source == null) {
+      this.document.addEventListener('valueChange',
+          goog.bind(this.sourceChangeHandler, this));
+        return;
     }
   }
   else
@@ -103,3 +102,21 @@ org.apache.flex.binding.BindingBase.prototype.set_strand = function(value) {
 org.apache.flex.binding.BindingBase.prototype.setDocument = function(document) {
   this.document = document;
 };
+
+
+/**
+ * @param {Object} event The event.
+ */
+org.apache.flex.binding.BindingBase.prototype.sourceChangeHandler = function(event) {
+  if (event.propertyName != this.sourceID)
+    return;
+
+  if (this.source)
+    this.source.removeEventListener(this.eventName,
+        goog.bind(this.changeHandler, this));
+
+  if (typeof(this.document['get_' + this.sourceID]) === 'function')
+    this.source = this.document['get_' + this.sourceID]();
+  else
+    this.source = this.document[this.sourceID];
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9de33e24/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
index 5301757..de3ef28 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
@@ -50,9 +50,14 @@ org.apache.flex.binding.SimpleBinding.prototype.eventName = '';
  * @expose
  */
 org.apache.flex.binding.SimpleBinding.prototype.changeHandler = function() {
-  this.destination['set_' + this.destinationPropertyName](
-      this.source['get_' + this.sourcePropertyName]()
-  );
+  if (typeof(this.destination['set_' + this.destinationPropertyName]) === 'function')
+    this.destination['set_' + this.destinationPropertyName](
+        this.source['get_' + this.sourcePropertyName]()
+    );
+  else {
+    this.destination[this.destinationPropertyName] =
+        this.source['get_' + this.sourcePropertyName]();
+  }
 };
 
 
@@ -62,8 +67,22 @@ org.apache.flex.binding.SimpleBinding.prototype.changeHandler = function() {
 org.apache.flex.binding.SimpleBinding.prototype.set_strand = function(value) {
   org.apache.flex.binding.SimpleBinding.base(this, 'set_strand', value);
 
+
   this.source.addEventListener(this.eventName,
       goog.bind(this.changeHandler, this));
 
   this.changeHandler();
 };
+
+
+/**
+ * @param {Object} event The event.
+ */
+org.apache.flex.binding.SimpleBinding.prototype.sourceChangeHandler = function(event) {
+  org.apache.flex.binding.SimpleBinding.base(this, 'sourceChangeHandler', event);
+  if (this.source) {
+    this.source.addEventListener(this.eventName,
+        goog.bind(this.changeHandler, this));
+    this.changeHandler();
+  }
+};
\ No newline at end of file


[10/31] git commit: [flex-asjs] [refs/heads/develop] - lint

Posted by ah...@apache.org.
lint


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

Branch: refs/heads/develop
Commit: d707eb6576f3ad7069932885a99218885899587d
Parents: 2e59305
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:47:35 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:41 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/Application.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d707eb65/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
index 5f79200..2137e7b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -84,7 +84,7 @@ org.apache.flex.core.Application.prototype.start = function() {
   this.element.flexjs_wrapper = this;
 
   org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, null, this.get_MXMLDescriptor());
-  
+
   this.dispatchEvent('initialize');
 
   this.initialView.applicationModel = this.model;


[27/31] git commit: [flex-asjs] [refs/heads/develop] - fix bead handling on HTTPService

Posted by ah...@apache.org.
fix bead handling on HTTPService


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

Branch: refs/heads/develop
Commit: 6cd888b7e38653ce15cde29958b24c586089e622
Parents: 7e97921
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 20:42:54 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:29 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/net/HTTPService.js      | 30 ++++++++++++++++++++
 1 file changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6cd888b7/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js b/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
index 7339bf6..0fa8400 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
@@ -64,6 +64,12 @@ org.apache.flex.net.HTTPService = function() {
 
   /**
    * @private
+   * @type {Array.<Object>}
+   */
+  this.beads_ = null;
+
+  /**
+   * @private
    * @type {number}
    */
   this.timeout_ = 0;
@@ -131,6 +137,15 @@ org.apache.flex.net.HTTPService.HTTP_METHOD_DELETE = 'DELETE';
 
 /**
  * @expose
+ * @param {Array.<Object>} value The array of beads.
+ */
+org.apache.flex.net.HTTPService.prototype.set_beads = function(value) {
+  this.beads_ = value;
+};
+
+
+/**
+ * @expose
  * @return {string} value The data.
  */
 org.apache.flex.net.HTTPService.prototype.get_data = function() {
@@ -414,3 +429,18 @@ org.apache.flex.net.HTTPService.prototype.get_MXMLProperties = function() {
 org.apache.flex.net.HTTPService.prototype.setDocument = function(document, id) {
   this.document = document;
 };
+
+
+/**
+ * @expose
+ * @param {Object} value The strand.
+ */
+org.apache.flex.net.HTTPService.prototype.set_strand = function(value) {
+  if (this.strand_ !== value) {
+    this.strand_ = value;
+  }
+  var n = this.beads_ ? this.beads_.length : 0;
+  for (var i = 0; i < n; i++) {
+    this.addBead(this.beads_[i]);
+  }
+};


[26/31] git commit: [flex-asjs] [refs/heads/develop] - these needed more wrapper references

Posted by ah...@apache.org.
these needed more wrapper references


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

Branch: refs/heads/develop
Commit: 6cb48abf7edbc9bc68b4bb6361c9b0a3e62e6988
Parents: a500760
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:40:44 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:28 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/html/ButtonBar.js    | 2 ++
 frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js     | 1 +
 frameworks/js/FlexJS/src/org/apache/flex/html/DropDownList.js | 2 ++
 frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js  | 1 +
 4 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6cb48abf/frameworks/js/FlexJS/src/org/apache/flex/html/ButtonBar.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ButtonBar.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ButtonBar.js
index 23e95c2..c7a6aa5 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/ButtonBar.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ButtonBar.js
@@ -81,5 +81,7 @@ org.apache.flex.html.ButtonBar.prototype.createElement =
 
   this.set_className('ButtonBar');
 
+  this.element.flexjs_wrapper = this;
+
   return this.element;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6cb48abf/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
index ecb44cc..3d7f3bb 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/CheckBox.js
@@ -55,6 +55,7 @@ org.apache.flex.html.CheckBox.prototype.createElement =
 
   this.positioner = this.element;
   cb.flexjs_wrapper = this;
+  this.element.flexjs_wrapper = this;
 
   return this.element;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6cb48abf/frameworks/js/FlexJS/src/org/apache/flex/html/DropDownList.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/DropDownList.js b/frameworks/js/FlexJS/src/org/apache/flex/html/DropDownList.js
index 6e92a1b..6ecf321 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/DropDownList.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/DropDownList.js
@@ -52,6 +52,8 @@ org.apache.flex.html.DropDownList.prototype.
       goog.bind(this.changeHandler, this));
   this.positioner = this.element;
 
+  this.element.flexjs_wrapper = this;
+
   return this.element;
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6cb48abf/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
index deb7032..98616a1 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/RadioButton.js
@@ -55,6 +55,7 @@ org.apache.flex.html.RadioButton.prototype.createElement =
 
   this.positioner = this.element;
   rb.flexjs_wrapper = this;
+  this.element.flexjs_wrapper = this;
 
   return this.element;
 };


[08/31] git commit: [flex-asjs] [refs/heads/develop] - fix asset copy

Posted by ah...@apache.org.
fix asset copy


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

Branch: refs/heads/develop
Commit: efdad8fbadfe82fc11989dd8403cae27bdea40a6
Parents: d707eb6
Author: Alex Harui <ah...@apache.org>
Authored: Wed Nov 26 15:51:05 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:41 2014 -0800

----------------------------------------------------------------------
 examples/FlexJSStore/build.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/efdad8fb/examples/FlexJSStore/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/build.xml b/examples/FlexJSStore/build.xml
index ebe81dd..1aa7d57 100644
--- a/examples/FlexJSStore/build.xml
+++ b/examples/FlexJSStore/build.xml
@@ -42,14 +42,14 @@
         <copy file="${basedir}/src/data/catalog.json" tofile="${basedir}/bin/js-release/data/catalog.json" />
         <mkdir dir="${basedir}/bin/js-debug/assets" />
         <copy todir="${basedir}/bin/js-debug/assets" >
-            <fileset dir="${basedir}/src">
-                <include name="assets/**" />
+            <fileset dir="${basedir}/src/assets">
+                <include name="**" />
             </fileset>
         </copy>
         <mkdir dir="${basedir}/bin/js-release/assets" />
         <copy todir="${basedir}/bin/js-release/assets" >
-            <fileset dir="${basedir}/src">
-                <include name="assets/**" />
+            <fileset dir="${basedir}/src/assets">
+                <include name="**" />
             </fileset>
         </copy>
     </target>


[20/31] git commit: [flex-asjs] [refs/heads/develop] - add per-instance style support

Posted by ah...@apache.org.
add per-instance style support


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

Branch: refs/heads/develop
Commit: 5a0b3b9bd48d6de0129ddd66421dd5b34b03cec7
Parents: 61e6822
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:35:44 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:44 2014 -0800

----------------------------------------------------------------------
 .../org/apache/flex/core/SimpleCSSValuesImpl.js | 105 +++++++++++++++++--
 1 file changed, 97 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5a0b3b9b/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 f0ff6a4..8fa8079 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
@@ -33,6 +33,12 @@ org.apache.flex.core.SimpleCSSValuesImpl.GLOBAL_SELECTOR = 'global';
 
 
 /**
+ * @type {string}
+ */
+org.apache.flex.core.SimpleCSSValuesImpl.UNIVERSAL_SELECTOR = '*';
+
+
+/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}
@@ -68,6 +74,22 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.getValue =
   var cName;
   var selectorName;
 
+  if (typeof(thisObject.get_style) === 'function')
+  {
+    var style = thisObject.get_style();
+    if (style != null)
+    {
+      try {
+         value = style[valueName];
+      }
+      catch (e) {
+        value = undefined;
+      }
+      if (value !== undefined)
+        return value;
+    }
+  }
+
   if ('className' in thisObject)
   {
     cName = thisObject.className;
@@ -141,14 +163,12 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.getValue =
     cName = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
   }
   o = values[org.apache.flex.core.SimpleCSSValuesImpl.GLOBAL_SELECTOR];
-  if (o !== undefined)
-  {
-    value = o[valueName];
-    if (value !== undefined)
-      return value;
-  }
-  o = values['*'];
-  return o[valueName];
+  if (o)
+    return o[valueName];
+  o = values[org.apache.flex.core.SimpleCSSValuesImpl.UNIVERSAL_SELECTOR];
+  if (o)
+    return o[valueName];
+  return undefined;
 };
 
 
@@ -211,3 +231,72 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.init = function(mainclass) {
 
   this.values = values;
 };
+
+
+/**
+ * @param {string} styles The styles as HTML style syntax.
+ * @return {Object} The styles object.
+ */
+org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles) {
+  var obj = {};
+  var parts = styles.split(';');
+  var l = parts.length;
+  for (var i = 0; i < l; i++) {
+    var part = parts[i];
+    var pieces = part.split(':');
+    var value = pieces[1];
+    if (value == 'null')
+      obj[pieces[0]] = null;
+    else if (value == 'true')
+      obj[pieces[0]] = true;
+    else if (value == 'false')
+      obj[pieces[0]] = false;
+    else {
+      var n = Number(value);
+      if (isNaN(n))
+        obj[pieces[0]] = value;
+      else
+        obj[pieces[0]] = n;
+    }
+  }
+  return obj;
+};
+
+
+/**
+ * The styles that apply to each UI widget
+ */
+org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles =
+  ['backgroundColor',
+   'backgroundImage',
+   'color',
+   'fontFamily',
+   'fontWeight',
+   'fontSize',
+   'fontStyle'];
+
+
+/**
+ * @param {Object} thisObject The object to apply styles to;
+ * @param {Object} styles The styles.
+ */
+org.apache.flex.core.SimpleCSSValuesImpl.prototype.applyStyles =
+    function(thisObject, styles) {
+  var styleList = org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles;
+  var n = styleList.length;
+  for (var i = 0; i < n; i++) {
+    this.applyStyle(thisObject, styleList[i]);
+  }
+};
+
+
+/**
+ * @param {Object} thisObject The object to apply styles to;
+ * @param {string} style The style name.
+ */
+org.apache.flex.core.SimpleCSSValuesImpl.prototype.applyStyle =
+    function(thisObject, style) {
+  var value = this.getValue(thisObject, style);
+  if (value !== undefined)
+    thisObject.element.style[style] = value;
+};
\ No newline at end of file


[15/31] git commit: [flex-asjs] [refs/heads/develop] - fix up GenericBinding

Posted by ah...@apache.org.
fix up GenericBinding


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

Branch: refs/heads/develop
Commit: f40081360265e01de04d75beac994ba2abbf776a
Parents: f538f2f
Author: Alex Harui <ah...@apache.org>
Authored: Wed Nov 26 15:52:34 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:42 2014 -0800

----------------------------------------------------------------------
 .../org/apache/flex/binding/GenericBinding.js   | 60 +++++++++++++++-----
 1 file changed, 47 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f4008136/frameworks/js/FlexJS/src/org/apache/flex/binding/GenericBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/GenericBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/GenericBinding.js
index f776bd5..602942d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/GenericBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/GenericBinding.js
@@ -15,6 +15,7 @@
 goog.provide('org.apache.flex.binding.GenericBinding');
 
 goog.require('org.apache.flex.binding.BindingBase');
+goog.require('org.apache.flex.events.ValueChangeEvent');
 
 
 
@@ -61,8 +62,11 @@ org.apache.flex.binding.GenericBinding.prototype.set_strand =
     function(value) {
   this.destination = value;
 
-  var val = this.getValueFromSource();
-  this.applyValue(val);
+  try {
+    var val = this.getValueFromSource();
+    this.applyValue(val);
+  } catch (e) {
+  }
 };
 
 
@@ -109,8 +113,7 @@ org.apache.flex.binding.GenericBinding.prototype.getValueFromSource =
  * @param {Object} value The value from the source as specified.
  */
 org.apache.flex.binding.GenericBinding.prototype.applyValue =
-    function(value)
-    {
+    function(value) {
   if (this.destinationFunction != null)
   {
     this.destinationFunction.apply(this.document, [value]);
@@ -119,16 +122,33 @@ org.apache.flex.binding.GenericBinding.prototype.applyValue =
   {
     var arr = this.destinationData;
     var n = arr.length;
-    var obj = this.document['get_' + arr[0]]();
-    if (obj == null)
-      return;
+    var obj;
+    var getter = 'get_' + arr[0];
+    if (typeof(this.document[getter]) === 'function')
+      obj = this.document[getter]();
+    else
+      obj = this.document[arr[0]];
+    if (obj == null) {
+       this.document.addEventListener(
+           org.apache.flex.events.ValueChangeEvent.VALUE_CHANGE,
+           this.destinationChangeHandler);
+       return;
+    }
     for (var i = 1; i < n - 1; i++)
     {
-      obj = obj['get_' + arr[i]]();
+      getter = 'get_' + arr[i];
+      if (typeof(this.document[getter]) === 'function')
+        obj = obj[getter]();
+      else
+        obj = obj[arr[i]];
       if (obj == null)
         return;
     }
-    obj['set_' + arr[n - 1]](value);
+    var setter = 'set_' + arr[n - 1];
+    if (typeof(obj[setter]) === 'function')
+      obj[setter](value);
+    else
+      obj[arr[n - 1]] = value;
   }
 };
 
@@ -138,9 +158,23 @@ org.apache.flex.binding.GenericBinding.prototype.applyValue =
  * @param {Object} value The value from the source as specified.
  */
 org.apache.flex.binding.GenericBinding.prototype.valueChanged =
-    function(value)
-    {
-  var val = this.getValueFromSource();
-  this.applyValue(val);
+    function(value) {
+
+  try {
+    var val = this.getValueFromSource();
+    this.applyValue(val);
+  } catch (e) {
+  }
+};
+
+
+/**
+ * @expose
+ * @param {Object} event The change event.
+ */
+org.apache.flex.binding.GenericBinding.prototype.destinationChangeHandler =
+    function(event) {
+  if (event.propertyName == this.destinationData[0])
+    this.valueChanged(null);
 };
 


[07/31] git commit: [flex-asjs] [refs/heads/develop] - MXML containers are their own document

Posted by ah...@apache.org.
MXML containers are their own document


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

Branch: refs/heads/develop
Commit: 840685ec13e1bb4a882f5cdb08e92e5d3cab70f5
Parents: f5c4df7
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 21 16:44:13 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:40 2014 -0800

----------------------------------------------------------------------
 .../FlexJS/src/org/apache/flex/core/ViewBase.js | 40 ++++++++++++++++++--
 1 file changed, 37 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/840685ec/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
index 9785941..17cf1bc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -49,6 +49,14 @@ org.apache.flex.core.ViewBase = function() {
    */
   this.currentState_ = '';
 
+  /**
+   * @private
+   * @type {boolean}
+   */
+  this.initialized_ = false;
+  
+  this.document = this;
+
 };
 goog.inherits(org.apache.flex.core.ViewBase, org.apache.flex.core.UIBase);
 
@@ -89,6 +97,25 @@ org.apache.flex.core.ViewBase.prototype.MXMLDescriptor = null;
 
 /**
  * @expose
+ * @type {Object} The document.
+ */
+org.apache.flex.core.ViewBase.prototype.document = null;
+
+
+/**
+ * @expose
+ * @param {Object} doc The document.
+ * @param {Array} desc The descriptor data;
+ */
+org.apache.flex.core.ViewBase.prototype.setMXMLDescriptor =
+    function(doc, desc) {
+  this.MXMLDescriptor = desc;
+  this.document = doc;
+}
+
+
+/**
+ * @expose
  */
 org.apache.flex.core.ViewBase.prototype.addedToParent = function() {
 
@@ -98,10 +125,17 @@ org.apache.flex.core.ViewBase.prototype.addedToParent = function() {
     org.apache.flex.core.ValuesManager.valuesImpl.init(this);
   }
 
-  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
-      this, this.get_MXMLDescriptor());
+  org.apache.flex.core.ViewBase.base(this, 'addedToParent')
 
-  this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));
+  if (!this.initialized_) {
+    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this.document,
+      this, this.MXMLDescriptor);
+
+    this.dispatchEvent(new org.apache.flex.events.Event('initBindings'));
+    this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));
+    this.initialized_ = true;
+  }
+  this.dispatchEvent(new org.apache.flex.events.Event('childrenAdded'));
 };
 
 


[14/31] git commit: [flex-asjs] [refs/heads/develop] - this bead is needed on the JS side as well

Posted by ah...@apache.org.
this bead is needed on the JS side 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/f538f2f4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f538f2f4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f538f2f4

Branch: refs/heads/develop
Commit: f538f2f4b5243e9dfc9cb7b817cc685b751c656c
Parents: efdad8f
Author: Alex Harui <ah...@apache.org>
Authored: Wed Nov 26 15:51:40 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:42 2014 -0800

----------------------------------------------------------------------
 frameworks/as/projects/FlexJSUI/defaults.css | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f538f2f4/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index 5dc967f..5d656ea 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -89,6 +89,11 @@ ButtonBarButtonItemRenderer
     height: 30;
 }
 
+Container
+{
+    IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+}
+
 List
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
@@ -209,7 +214,6 @@ ComboBox
 
 Container
 {
-    IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
     iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
 }


[28/31] git commit: [flex-asjs] [refs/heads/develop] - needs requires

Posted by ah...@apache.org.
needs requires


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

Branch: refs/heads/develop
Commit: 3ad5889fa756b32c0d763a9c8b85a85480dae542
Parents: 6cb48ab
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:41:11 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:29 2014 -0800

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js       | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3ad5889f/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js
index c578c6d..6e9b1da 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ContainerView.js
+++ b/frameworks/js/FlexJS/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.ILayoutParent');
 
 
 


[31/31] git commit: [flex-asjs] [refs/heads/develop] - fix is/as

Posted by ah...@apache.org.
fix is/as


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

Branch: refs/heads/develop
Commit: 43cd5b577fbbe656d94dba378231b134749d5317
Parents: 22d812b
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 20:45:55 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 21:09:30 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/43cd5b57/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index f29433d..e88f6a4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -109,7 +109,8 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand) {
       }
 
       if (interfaces[i].prototype.FLEXJS_CLASS_INFO.interfaces) {
-        return checkInterfaces(new interfaces[i]());
+        var isit = checkInterfaces(new interfaces[i]());
+        if (isit) return true;
       }
     }
 


[02/31] git commit: [flex-asjs] [refs/heads/develop] - handle fx:Declarations in main app

Posted by ah...@apache.org.
handle fx:Declarations in main app


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

Branch: refs/heads/develop
Commit: 0b84dc0d18cd298a5a07e75b01a9d441094417fd
Parents: 5712e6c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Nov 18 07:47:27 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 20:47:39 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0b84dc0d/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
index c3a8e1e..5f79200 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -83,6 +83,8 @@ org.apache.flex.core.Application.prototype.start = function() {
   this.element = document.getElementsByTagName('body')[0];
   this.element.flexjs_wrapper = this;
 
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, null, this.get_MXMLDescriptor());
+  
   this.dispatchEvent('initialize');
 
   this.initialView.applicationModel = this.model;