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

[1/9] [FlexJS] initial commit of 'goog.events' refactoring

Updated Branches:
  refs/heads/develop 9de125f11 -> 96fe140ec


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 5850b47..8715c19 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
@@ -3,7 +3,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,258 +14,273 @@
 
 goog.provide('org.apache.flex.utils.MXMLDataInterpreter');
 
-goog.require('org.apache.flex.FlexGlobal');
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.utils.MXMLDataInterpreter = function() {
-    org.apache.flex.FlexObject.call(this);
-
 };
-goog.inherits(org.apache.flex.utils.MXMLDataInterpreter,
-                org.apache.flex.FlexObject);
+
 
 /**
- * @param {object} document The MXML object.
+ * @param {Object} document The MXML object.
  * @param {Array} data The data array.
- * @return {object} The generated object.
+ * @return {Object} The generated object.
  */
 org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject =
-                                                    function(document, data) {
-        var i = 0;
-        var cls = data[i++];
-        var comp = new cls();
-
-        var m;
-        var j;
-        var name;
-        var simple;
-        var value;
-        var id;
-
-        var generateMXMLArray =
-            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
-        var 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 (simple == null)
-                value = generateMXMLArray(document, null, value);
-            else if (simple == false)
-                value = generateMXMLObject(document, value);
-            if (name == 'id')
-            {
-                document['set_' + value](comp);
-                id = value;
-            }
-            else if (name == '_id')
-            {
-                document[value] = comp;
-                id = value;
-                continue; // skip assignment to comp
-            }
-            if (typeof(comp['set_' + name]) == 'function')
-                comp['set_' + name](value);
-            else
-                comp[name] = value;
-        }
-        if (typeof(comp.setDocument) == 'function')
-            comp.setDocument(document, id);
-        return comp;
+    function(document, data) {
+  var assingComp, Cls, comp, generateMXMLArray, generateMXMLObject, i, id, j, m,
+      name, simple, value;
+
+  i = 0;
+  Cls = data[i++];
+  comp = new Cls();
+
+  generateMXMLArray =
+      org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
+  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 (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 (assingComp) {
+      if (typeof comp['set_' + name] === 'function') {
+        comp['set_' + name](value);
+      } else {
+        comp[name] = value;
+      }
+    }
+  }
+
+  if (typeof comp.setDocument === 'function') {
+    comp.setDocument(document, id);
+  }
+
+  return comp;
 };
 
+
 /**
  * @expose
  * @param {Object} document The MXML object.
  * @param {Object} parent The parent object.
  * @param {Array} data The data array.
- * @param {Boolean} recursive Whether to create objects in children.
+ * @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, recursive) {
-        if (typeof(recursive) == 'undefined')
-            recursive = true;
+    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;
 
-        var generateMXMLArray =
-            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
-        var generateMXMLObject =
-            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
+  if (typeof opt_recursive === 'undefined') {
+    opt_recursive = true;
+  }
 
-        var comps = [];
+  generateMXMLArray =
+      org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
+  generateMXMLObject =
+      org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
 
-        var n = data.length;
-        var i = 0;
-        while (i < n)
-        {
-            var cls = data[i++];
-            var comp = new cls();
-
-            if (parent)
-            {
-                comp.addToParent(parent.element);
-            }
-
-            var m;
-            var j;
-            var name;
-            var simple;
-            var value;
-            var id = null;
-
-            m = data[i++]; // num props
-            if (m > 0 && data[0] == 'model')
-            {
-                m--;
-                name = data[i++];
-                simple = data[i++];
-                value = data[i++];
-                if (simple == null)
-                    value = generateMXMLArray(document, parent,
-                                                value, recursive);
-                else if (simple == false)
-                    value = generateMXMLObject(document, value);
-                if (typeof(comp['set_' + name]) == 'function')
-                    comp['set_' + name](value);
-                else
-                    comp[name] = value;
-                if (typeof(value.addBead) == 'function' &&
-                    typeof(comp.get_strand) == 'function')
-                    comp.addBead(value);
-            }
-            if (typeof(comp.initModel) == 'function')
-                comp.initModel();
-            var beadOffset = i + (m - 1) * 3;
-            if (m > 0 && data[beadOffset] == 'beads')
-            {
-                m--;
-            }
-            else
-                beadOffset = -1;
-            for (j = 0; j < m; j++)
-            {
-                name = data[i++];
-                simple = data[i++];
-                value = data[i++];
-                if (simple == null)
-                    value = generateMXMLArray(document, null, value, recursive);
-                else if (simple == false)
-                    value = generateMXMLObject(document, value);
-                if (name == 'id')
-                    id = value;
-                if (name == 'document' && !comp.document)
-                    comp.document = document;
-                else if (name == '_id')
-                    id = value; // and don't assign to comp
-                else
-                {
-                    if (typeof(comp['set_' + name]) == 'function')
-                        comp['set_' + name](value);
-                    else
-                        comp[name] = value;
-                }
-            }
-            if (beadOffset > -1)
-            {
-                name = data[i++];
-                simple = data[i++];
-                value = data[i++];
-                if (simple == null)
-                    value = generateMXMLArray(document, null, value, recursive);
-                else if (simple == false)
-                    value = generateMXMLObject(document, value);
-                else
-                {
-                if (typeof(comp['set_' + name]) == 'function')
-                    comp['set_' + name](value);
-                else
-                    comp[name] = value;
-                }
-                var beads = value;
-                var l = beads.length;
-                for (var k = 0; k < l; k++)
-                {
-                    var bead = beads[k];
-                    comp.addBead(bead);
-                }
-            }
-            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, recursive);
-                else if (simple == false)
-                    value = generateMXMLObject(document, value);
-                comp.setStyle(name, value);
-            }
-            if (typeof(comp.initSkin) == 'function')
-            {
-                comp.initSkin();
-            }
-
-            /*
-            m = data[i++]; // num effects
-            for (j = 0; j < m; j++)
-            {
-                name = data[i++];
-                simple = data[i++];
-                value = data[i++];
-                if (simple == null)
-                    value = generateMXMLArray(document, null, value, recursive);
-                else if (simple == false)
-                    value = generateMXMLObject(document, value);
-                comp.setStyle(name, value);
-            }
-            */
-
-            m = data[i++]; // num events
-            for (j = 0; j < m; j++)
-            {
-                name = data[i++];
-                value = data[i++];
-                comp.addEventListener(name,
-                    org.apache.flex.FlexGlobal.createProxy(document, value));
-            }
-
-            var children = data[i++];
-            if (children)
-            {
-                if (recursive)
-                {
-                    self = org.apache.flex.utils.MXMLDataInterpreter;
-                    self.generateMXMLInstances(
-                    document, comp, children, recursive);
-                }
-                else
-                    comp.setMXMLDescriptor(children);
-            }
-
-            if (id)
-            {
-                if (typeof(document['set_' + id]) == 'function')
-                    document['set_' + id](comp);
-                else
-                    document[id] = comp;
-            }
-
-            if (typeof(comp.setDocument) == 'function')
-                comp.setDocument(document, id);
-            comps.push(comp);
+  comps = [];
+
+  n = data.length;
+  i = 0;
+  while (i < n) {
+    Cls = data[i++];
+    comp = new Cls();
+
+    if (parent) {
+      comp.addToParent(parent.element);
+    }
+
+    id = null;
+
+    m = data[i++]; // num props
+    if (m > 0 && data[0] === 'model') {
+      m--;
+      name = data[i++];
+      simple = data[i++];
+      value = data[i++];
+
+      if (simple === null) {
+        value = generateMXMLArray(document, parent, value, opt_recursive);
+      } else if (simple === false) {
+        value = generateMXMLObject(document, value);
+      }
+
+      if (typeof comp['set_' + name] === 'function') {
+        comp['set_' + name](value);
+      } else {
+        comp[name] = 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.initModel) === 'function') {
+      comp.initModel();
+    }
+
+    beadOffset = i + (m - 1) * 3;
+    if (m > 0 && data[beadOffset] === 'beads') {
+      m--;
+    } else {
+      beadOffset = -1;
+    }
+
+    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 (name === 'id') {
+        id = value;
+      }
+
+      if (name === 'document' && !comp.document) {
+        comp.document = document;
+      } else if (name === '_id') {
+        id = value; // and don't assign to comp
+      } else {
+        if (typeof(comp['set_' + name]) === 'function') {
+          comp['set_' + name](value);
+        } else {
+          comp[name] = value;
+        }
+      }
+    }
+
+    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);
+      } else {
+        if (typeof(comp['set_' + name]) === 'function') {
+          comp['set_' + name](value);
+        } else {
+          comp[name] = value;
         }
-        return comps;
+      }
+
+      beads = value;
+      l = beads.length;
+      for (k = 0; k < l; k++) {
+        bead = beads[k];
+        comp.addBead(bead);
+      }
+    }
+
+    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);
+      }
+
+      comp.setStyle(name, value);
+    }
+    if (typeof(comp.initSkin) === 'function') {
+      comp.initSkin();
+    }
+
+    /*
+    m = data[i++]; // num effects
+    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);
+      comp.setStyle(name, value);
+    }
+    */
+
+    m = data[i++]; // num events
+    for (j = 0; j < m; j++) {
+      name = data[i++];
+      value = data[i++];
+
+      comp.addEventListener(name, goog.bind(value, document));
+    }
+
+    children = data[i++];
+    if (children) {
+      if (opt_recursive) {
+        self = org.apache.flex.utils.MXMLDataInterpreter;
+        self.generateMXMLInstances(
+            document, comp, children, opt_recursive);
+      } else {
+        comp.setMXMLDescriptor(children);
+      }
+    }
+
+    if (id) {
+      if (typeof(document['set_' + id]) === 'function') {
+        document['set_' + id](comp);
+      } else {
+        document[id] = comp;
+      }
+    }
+
+    if (typeof(comp.setDocument) === 'function') {
+      comp.setDocument(document, id);
+    }
+
+    comps.push(comp);
+  }
+
+  return comps;
 };
 
+
 /**
  * @expose
  * @param {Object} document The MXML object.
@@ -274,128 +289,136 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
  * @param {Boolean} recursive Whether to create objects in children.
  */
 org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances =
-                                function(document, parent, data, recursive) {
-    if (data)
-        org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray(
-                                document, parent, data, recursive);
+    function(document, parent, data, recursive) {
+  if (data) {
+    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray(
+        document, parent, data, recursive);
+  }
 };
 
+
 /**
  * @expose
  * @param {Object} host The MXML object.
  * @param {Array} data The data array.
  */
 org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties =
-                                                    function(host, data) {
-        if (!data) return;
-        
-        var i = 0;
-        var m;
-        var j;
-        var name;
-        var simple;
-        var value;
-        var id = null;
-
-        var generateMXMLArray =
-            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
-        var generateMXMLObject =
-            org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
-
-        m = data[i++]; // num props
-        var beadOffset = i + (m - 1) * 3;
-        if (m > 0 && data[beadOffset] == 'beads')
-        {
-            m--;
-        }
-        else
-            beadOffset = -1;
-        for (j = 0; j < m; j++)
-        {
-            name = data[i++];
-            simple = data[i++];
-            value = data[i++];
-            if (simple == null)
-                value = generateMXMLArray(host, null, value, true);
-            else if (simple == false)
-                value = generateMXMLObject(host, value);
-            if (name == 'id')
-                id = value;
-            if (name == '_id')
-                id = value; // and don't assign
-            else
-            {
-                if (typeof(host['set_' + name]) == 'function')
-                    host['set_' + name](value);
-                else
-                    host[name] = value;
-            }
-        }
-        if (beadOffset > -1)
-        {
-            name = data[i++];
-            simple = data[i++];
-            value = data[i++];
-            if (simple == null)
-                value = generateMXMLArray(host, null, value, true);
-            else if (simple == false)
-                value = generateMXMLObject(host, value);
-            else
-            {
-            if (typeof(host['set_' + name]) == 'function')
-                host['set_' + name](value);
-            else
-                host[name] = value;
-            }
-            var beads = value;
-            var l = beads.length;
-            for (var k = 0; k < l; k++)
-            {
-                var bead = beads[k];
-                host.addBead(bead);
-            }
-        }
+    function(host, data) {
+  var bead, beadOffset, beads, generateMXMLArray, generateMXMLObject, i, id, j,
+      k, l, m, name, simple, value;
 
-        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(host, null, value, true);
-            else if (simple == false)
-                value = generateMXMLObject(host, value);
-            if (typeof(host['set_' + name]) == 'function')
-                host['set_' + name](value);
-            else
-                host[name] = value;
-        }
+  if (!data) {
+    return;
+  }
+
+  i = 0;
+  id = null;
+
+  generateMXMLArray =
+      org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray;
+  generateMXMLObject =
+      org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
+
+  m = data[i++]; // num props
+  beadOffset = i + (m - 1) * 3;
+  if (m > 0 && data[beadOffset] === 'beads') {
+    m--;
+  } else {
+    beadOffset = -1;
+  }
+
+  for (j = 0; j < m; j++) {
+    name = data[i++];
+    simple = data[i++];
+    value = data[i++];
+
+    if (simple === null) {
+      value = generateMXMLArray(host, null, value, true);
+    } else if (simple === false) {
+      value = generateMXMLObject(host, value);
+    }
+
+    if (name === 'id') {
+      id = value;
+    }
 
-        /*
+    if (name === '_id') {
+      id = value; // and don't assign
+    } else {
+      if (typeof(host['set_' + name]) === 'function') {
+        host['set_' + name](value);
+      } else {
+        host[name] = value;
+      }
+    }
+  }
+
+  if (beadOffset > -1) {
+    name = data[i++];
+    simple = data[i++];
+    value = data[i++];
+
+    if (simple === null) {
+      value = generateMXMLArray(host, null, value, true);
+    } else if (simple === false) {
+      value = generateMXMLObject(host, value);
+    } else {
+      if (typeof(host['set_' + name]) === 'function') {
+        host['set_' + name](value);
+      } else {
+        host[name] = value;
+      }
+    }
+
+    beads = value;
+    l = beads.length;
+    for (k = 0; k < l; k++) {
+      bead = beads[k];
+      host.addBead(bead);
+    }
+  }
+
+  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(host, null, value, true);
+    } else if (simple === false) {
+      value = generateMXMLObject(host, value);
+    }
+
+    if (typeof(host['set_' + name]) === 'function') {
+      host['set_' + name](value);
+    } else {
+      host[name] = value;
+    }
+  }
+
+  /*
         m = data[i++]; // num effects
         for (j = 0; j < m; j++)
         {
             name = data[i++];
             simple = data[i++];
             value = data[i++];
-            if (simple == null)
+            if (simple === null)
                 value = generateMXMLArray(host, null, value, false);
-            else if (simple == false)
+            else if (simple === false)
                 value = generateMXMLObject(host, value);
             if (typeof(host['set_' + name]) == 'function')
                 host['set_' + name](value);
             else
                 host[name] = value;
         }
-        */
+      */
 
-        m = data[i++]; // num events
-        for (j = 0; j < m; j++)
-        {
-            name = data[i++];
-            value = data[i++];
-            host.addEventListener(name,
-                org.apache.flex.FlexGlobal.createProxy(host, value));
-        }
+  m = data[i++]; // num events
+  for (j = 0; j < m; j++) {
+    name = data[i++];
+    value = data[i++];
+    host.addEventListener(name, goog.bind(value, host));
+  }
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
index 9481118..49a8d4e 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
@@ -14,44 +14,44 @@
 
 goog.provide('org.apache.flex.utils.Timer');
 
-goog.require('org.apache.flex.FlexGlobal');
 goog.require('org.apache.flex.events.EventDispatcher');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.events.EventDispatcher}
+ * @param {number} delay The delay.
+ * @param {number=} opt_repeatCount The repeatCount.
  */
-org.apache.flex.utils.Timer = function(delay, repeatCount) {
-    org.apache.flex.events.EventDispatcher.call(this);
-    
-    
-    /**
-     * @private
-     * @type {number}
-     */
-    this.timerInterval = -1;
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this._delay = delay;
-    
-    /**
-     * @private
-     * @type {number}
-     */
-    this._currentCount = 0;
-    
-
-    if (typeof(repeatCount) != 'undefined') 
-    { 
-        this._repeatCount = repeatCount;
-    }
-
+org.apache.flex.utils.Timer = function(delay, opt_repeatCount) {
+  goog.base(this);
+
+  if (typeof opt_repeatCount !== 'undefined') {
+    this._repeatCount = opt_repeatCount;
+  }
+
+  /**
+   * @protected
+   * @type {number}
+   */
+  this.timerInterval = -1;
+
+  /**
+   * @protected
+   * @type {number}
+   */
+  this._delay = delay;
+
+  /**
+   * @protected
+   * @type {number}
+   */
+  this._currentCount = 0;
 };
 goog.inherits(org.apache.flex.utils.Timer,
-                org.apache.flex.events.EventDispatcher);
+    org.apache.flex.events.EventDispatcher);
+
 
 /**
  * @expose
@@ -59,98 +59,104 @@ goog.inherits(org.apache.flex.utils.Timer,
  * Stops the timer and sets currentCount = 0.
  */
 org.apache.flex.utils.Timer.prototype.reset = function() {
-    this.stop();
-    this._currentCount = 0;
+  this.stop();
+  this._currentCount = 0;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
  * Stops the timer.
  */
-org.apache.flex.utils.Timer.prototype.stop =
-                                function() {
-    clearInterval(this.timerInterval);
-    this.timerInterval = -1;
+org.apache.flex.utils.Timer.prototype.stop = function() {
+  clearInterval(this.timerInterval);
+  this.timerInterval = -1;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
  * Starts the timer.
  */
-org.apache.flex.utils.Timer.prototype.start =
-                                function() {
-    this.timerInterval = setInterval(org.apache.flex.FlexGlobal.createProxy     
-        (this, this.timerHandler),
-        this._delay);
+org.apache.flex.utils.Timer.prototype.start = function() {
+  this.timerInterval =
+      setInterval(goog.bind(this.timerHandler, this), this._delay);
 };
 
+
 /**
- * @private
+ * @protected
  * @this {org.apache.flex.utils.Timer}
  */
 org.apache.flex.utils.Timer.prototype.timerHandler =
-                                function() {
-    this._currentCount++;
-    if (this._repeatCount > 0 && this._currentCount >= this._repeatCount)
-        this.stop();
-        
-    var evt = org.apache.flex.events.EventDispatcher.createEvent('timer');
-    this.dispatchEvent(evt);
-    
+    function() {
+  this._currentCount++;
+  if (this._repeatCount > 0 && this._currentCount >= this._repeatCount) {
+    this.stop();
+  }
+
+  this.dispatchEvent(new org.apache.flex.events.Event('timer'));
+
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
- * @returns {Number} The currentCount.
+ * @return {Number} The currentCount.
  */
 org.apache.flex.utils.Timer.prototype.get_currentCount = function() {
-    return this._currentCount;
+  return this._currentCount;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
- * @returns {boolean} True if the timer is running.
+ * @return {boolean} True if the timer is running.
  */
 org.apache.flex.utils.Timer.prototype.get_running = function() {
-    return this.timerInterval != -1;
+  return this.timerInterval !== -1;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
- * @returns {Number} The number of milliseconds between events.
+ * @return {Number} The number of milliseconds between events.
  */
 org.apache.flex.utils.Timer.prototype.get_delay = function() {
-    return this._delay;
+  return this._delay;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
  * @param {Number} value The number of milliseconds between events.
  */
 org.apache.flex.utils.Timer.prototype.set_delay = function(value) {
-    this._delay = value;
+  this._delay = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
- * @returns {Number} The repeat count.
+ * @return {Number} The repeat count.
  */
 org.apache.flex.utils.Timer.prototype.get_repeatCount = function() {
-    return this._repeatCount;
+  return this._repeatCount;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.utils.Timer}
  * @param {Number} value The repeat count.
  */
 org.apache.flex.utils.Timer.prototype.set_repeatCount = function(value) {
-    this._repeatCount = value;
+  this._repeatCount = value;
 };


[2/9] [FlexJS] initial commit of 'goog.events' refactoring

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/ComboBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/ComboBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/ComboBox.js
index 39daf06..32fb135 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/ComboBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/ComboBox.js
@@ -14,26 +14,19 @@
 
 goog.provide('org.apache.flex.html5.staticControls.ComboBox');
 
-goog.require('org.apache.flex.core.UIBase');
+goog.require('org.apache.flex.core.ListBase');
+
 
 
 /**
  * @constructor
- * @extends {org.apache.flex.core.UIBase}
+ * @extends {org.apache.flex.core.ListBase}
  */
 org.apache.flex.html5.staticControls.ComboBox = function() {
-    org.apache.flex.core.UIBase.call(this);
-    
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this._dataProvider;
-    this._selectedIndex = -1;
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.ComboBox, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.ComboBox,
+    org.apache.flex.core.ListBase);
 
 
 /**
@@ -41,205 +34,150 @@ goog.inherits(
  * @this {org.apache.flex.html5.staticControls.ComboBox}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html5.staticControls.ComboBox.prototype.addToParent = 
-function(p) {
-	this.element = document.createElement('div');
-	
-	var input = document.createElement('input');
-	input.style.position = "absolute";
-	input.style.width = "80px";
-	this.element.appendChild(input);
-	
-	var button = document.createElement('div');
-	button.style.position = "absolute";
-	button.style.top = "0px";
-	button.style.right = "0px";
-	button.style.background = "#bbb";
-	button.style.width = "16px";
-	button.style.height = "20px";
-	button.style.margin = "0";
-	button.style.border = "solid #609 1px";
-	button.onclick = org.apache.flex.FlexGlobal.createProxy(
-                this, this.buttonClicked);
-	this.element.appendChild(button);
-	
-	this.element.style.position = "relative";
-	
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
-    
-    // add a click handler to p's parentElement so that a click
-    // outside of the combo box can dismiss the pop-up should it
-    // be visible
-    p.parentElement.onclick = org.apache.flex.FlexGlobal.createProxy(
-                this, this.dismissPopup);
+org.apache.flex.html5.staticControls.ComboBox.prototype.addToParent =
+    function(p) {
+  var button, input;
+
+  this.element = document.createElement('div');
+
+  input = document.createElement('input');
+  input.style.position = 'absolute';
+  input.style.width = '80px';
+  this.element.appendChild(input);
+
+  button = document.createElement('div');
+  button.style.position = 'absolute';
+  button.style.top = '0px';
+  button.style.right = '0px';
+  button.style.background = '#bbb';
+  button.style.width = '16px';
+  button.style.height = '20px';
+  button.style.margin = '0';
+  button.style.border = 'solid #609 1px';
+  button.onclick = goog.bind(this.buttonClicked, this);
+  this.element.appendChild(button);
+
+  this.element.style.position = 'relative';
+
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
+
+  // add a click handler to p's parentElement so that a click
+  // outside of the combo box can dismiss the pop-up should it
+  // be visible
+  p.parentElement.onclick = goog.bind(this.dismissPopup, this);
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.ComboBox}
+ * @param {string} event The event.
  */
 org.apache.flex.html5.staticControls.ComboBox.prototype.selectChanged =
-function(event) {
-	var select = event.currentTarget;
-//	var input = this.element.childNodes.item(0);
-//	input.value = select.value;
-	this.set_selectedItem(select.value);
-	
-	this.popup.parentNode.removeChild(this.popup);
-	this.popup = null;
-	
-	var evt = this.createEvent('change');
-    this.dispatchEvent(evt);
-};
+    function(event) {
+  var select;
 
+  select = event.currentTarget;
+  this.set_selectedItem(select.value);
 
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.ComboBox}
- */
-org.apache.flex.html5.staticControls.ComboBox.prototype.dismissPopup =
-function(event) {
+  this.popup.parentNode.removeChild(this.popup);
+  this.popup = null;
 
-	// remove the popup if it already exists
-	if( this.popup ) {
-		this.popup.parentNode.removeChild(this.popup);
-		this.popup = null;
-	}
+  this.dispatchEvent('change');
 };
 
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.ComboBox}
- */
-org.apache.flex.html5.staticControls.ComboBox.prototype.buttonClicked =
-function(event) {
-
-	event.stopPropagation();
-	
-	// remove the popup if it already exists
-	if( this.popup ) {
-		this.popup.parentNode.removeChild(this.popup);
-		this.popup = null;
-		return;
-	}
-	
-	var input = this.element.childNodes.item(0);
-	
-	var pn = this.element;
-	var top = pn.offsetTop + input.offsetHeight;
-	var left = pn.offsetLeft;
-	var width = pn.offsetWidth;
-	
-    var popup = document.createElement('div');
-    popup.className = 'popup';
-    popup.id = 'test';
-    popup.style.position = "absolute";
-    popup.style.top = top.toString() + "px";
-    popup.style.left = left.toString() + "px";
-    popup.style.width = width.toString() + "px";
-    popup.style.margin = "0px auto";
-    popup.style.padding = "0px";
-    popup.style.zIndex = "10000";
-    
-    var select = document.createElement('select');
-    select.style.width = width.toString() + "px";
-	select.onchange = org.apache.flex.FlexGlobal.createProxy(
-                this, this.selectChanged);
-    var opts = select.options;
-
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (i = 0; i < n; i++)
-    {
-        var opt = document.createElement('option');
-        opt.text = dp[i];
-        opts.add(opt);
-    }
-    select.size = n;
-    if( this._selectedIndex < 0 ) select.value = null;
-    else select.value = this._dataProvider[this._selectedIndex];
-    
-    this.popup = popup;
-
-    popup.appendChild(select); 
-    document.body.appendChild(popup);
-    
-
-};
 
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.ComboBox}
- * @return {Array.<Object>} The collection of data.
+ * @param {string} event The event.
  */
-org.apache.flex.html5.staticControls.ComboBox.prototype.get_dataProvider =
-function() {
-    return this._dataProvider;
+org.apache.flex.html5.staticControls.ComboBox.prototype.dismissPopup =
+    function(event) {
+  if (this.popup) {
+    this.popup.parentNode.removeChild(this.popup);
+    this.popup = null;
+  }
 };
 
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.ComboBox}
- * @param {Array.<Object>} value The text setter.
- */
-org.apache.flex.html5.staticControls.ComboBox.prototype.set_dataProvider =
-function(value) {
-    this._dataProvider = value;
-};
 
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.ComboBox}
- * @return {int} The selected index.
+ * @param {string} event The event.
  */
-org.apache.flex.html5.staticControls.ComboBox.prototype.get_selectedIndex =
-function() {
-    return this._selectedIndex;
+org.apache.flex.html5.staticControls.ComboBox.prototype.buttonClicked =
+    function(event) {
+  var dp, i, input, left, n, opt, opts, pn, popup, select, si, top, width;
+
+  event.stopPropagation();
+
+  if (this.popup) {
+    this.popup.parentNode.removeChild(this.popup);
+    this.popup = null;
+    return;
+  }
+
+  input = this.element.childNodes.item(0);
+
+  pn = this.element;
+  top = pn.offsetTop + input.offsetHeight;
+  left = pn.offsetLeft;
+  width = pn.offsetWidth;
+
+  popup = document.createElement('div');
+  popup.className = 'popup';
+  popup.id = 'test';
+  popup.style.position = 'absolute';
+  popup.style.top = top.toString() + 'px';
+  popup.style.left = left.toString() + 'px';
+  popup.style.width = width.toString() + 'px';
+  popup.style.margin = '0px auto';
+  popup.style.padding = '0px';
+  popup.style.zIndex = '10000';
+
+  select = document.createElement('select');
+  select.style.width = width.toString() + 'px';
+  select.onchange = goog.bind(this.selectChanged, this);
+  opts = select.options;
+
+  dp = this.get_dataProvider();
+  n = dp.length;
+  for (i = 0; i < n; i++) {
+    opt = document.createElement('option');
+    opt.text = dp[i];
+    opts.add(opt);
+  }
+
+  select.size = n;
+
+  si = this.get_selectedIndex();
+  if (si < 0) {
+    select.value = null;
+  } else {
+    select.value = dp[si];
+  }
+
+  this.popup = popup;
+
+  popup.appendChild(select);
+  document.body.appendChild(popup);
 };
 
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.ComboBox}
- * @param {int} value The selected index.
- */
-org.apache.flex.html5.staticControls.ComboBox.prototype.set_selectedIndex =
-function(value) {
-    this._selectedIndex = value;
-};
 
 /**
+ * @override
  * @expose
- * @this {org.apache.flex.html5.staticControls.ComboBox}
- * @return {Object} The selected item.
+ * @this {org.apache.flex.html.staticControls.ComboBox}
+ * @param {Array.<Object>} value The collection of data.
  */
-org.apache.flex.html5.staticControls.ComboBox.prototype.get_selectedItem =
-function() {
-	if( this._dataProvider == null || this._selectedIndex < 0 || this._selectedIndex >= this._dataProvider.length ) return null;
-    return this._dataProvider[this._selectedIndex];
+org.apache.flex.html.staticControls.ComboBox.prototype.set_dataProvider =
+    function(value) {
+  this.dataProvider_ = value;
 };
 
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.ComboBox}
- * @param {Object} value The selected item.
- */
-org.apache.flex.html5.staticControls.ComboBox.prototype.set_selectedItem =
-function(value) {
-
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (dp[i] == value)
-            break;
-    }
-    if (i < n) {
-        this._selectedIndex = i;
-        this.element.childNodes.item(0).value = this._dataProvider[i];
-    }
-};
 
 /**
  * @expose
@@ -247,14 +185,16 @@ function(value) {
  * @return {string} The text getter.
  */
 org.apache.flex.html5.staticControls.ComboBox.prototype.get_text = function() {
-    return this.element.childNodes.item(0).value;
+  return this.element.childNodes.item(0).value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.ComboBox}
  * @param {string} value The text setter.
  */
-org.apache.flex.html5.staticControls.ComboBox.prototype.set_text = function(value) {
-    this.element.childNodes.item(0).value = value;
+org.apache.flex.html5.staticControls.ComboBox.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(0).value = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/DropDownList.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/DropDownList.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/DropDownList.js
index 0ae45d0..406c262 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/DropDownList.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/DropDownList.js
@@ -14,131 +14,16 @@
 
 goog.provide('org.apache.flex.html5.staticControls.DropDownList');
 
-goog.require('org.apache.flex.core.UIBase');
+goog.require('org.apache.flex.core.ListBase');
 
-/**
- * @constructor
- * @extends {org.apache.flex.core.UIBase}
- */
-org.apache.flex.html5.staticControls.DropDownList = function() {
-    org.apache.flex.core.UIBase.call(this);
-
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this._dataProvider;
 
-};
-goog.inherits(
-    org.apache.flex.html5.staticControls.DropDownList, org.apache.flex.core.UIBase
-);
-
-/**
- * @override
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @param {Object} p The parent element.
- */
-org.apache.flex.html5.staticControls.DropDownList.prototype.addToParent = function(p) {
-    this.element = document.createElement('select');
-    this.element.onchange = org.apache.flex.FlexGlobal.createProxy(
-                this, this.changeHandler);
-                
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @return {Array.<Object>} The collection of data.
- */
-org.apache.flex.html5.staticControls.DropDownList.prototype.get_dataProvider =
-function() {
-    return this._dataProvider;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @param {Array.<Object>} value The text setter.
- */
-org.apache.flex.html5.staticControls.DropDownList.prototype.set_dataProvider =
-function(value) {
-    this._dataProvider = value;
-
-    var dp = this.element.options;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-        dp.remove(0);
-
-    n = value.length;
-    for (i = 0; i < n; i++)
-    {
-        var opt = document.createElement('option');
-        opt.text = value[i];
-        dp.add(opt);
-    }
-};
 
 /**
- * @expose
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @return {int} The selected index.
- */
-org.apache.flex.html5.staticControls.DropDownList.prototype.get_selectedIndex =
-function() {
-    return this.element.selectedIndex;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @param {int} value The selected index.
- */
-org.apache.flex.html5.staticControls.DropDownList.prototype.set_selectedIndex =
-function(value) {
-    this.element.selectedIndex = value;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @return {Object} The selected item.
- */
-org.apache.flex.html5.staticControls.DropDownList.prototype.get_selectedItem =
-function() {
-    return this._dataProvider[this.element.selectedIndex];
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @param {Object} value The selected item.
- */
-org.apache.flex.html5.staticControls.DropDownList.prototype.set_selectedItem =
-function(value) {
-
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (dp[i] == value)
-            break;
-    }
-    if (i < n)
-        this.element.selectedIndex = i;
-};
-
-/**
- * @protected
- * @this {org.apache.flex.html5.staticControls.DropDownList}
- * @return {Object} The selected item.
+ * @constructor
+ * @extends {org.apache.flex.core.ListBase}
  */
-org.apache.flex.html5.staticControls.DropDownList.prototype.changeHandler =
-function() {
-    evt = this.createEvent('change');
-    this.dispatchEvent(evt);
+org.apache.flex.html5.staticControls.DropDownList = function() {
+  goog.base(this);
 };
-
+goog.inherits(org.apache.flex.html5.staticControls.DropDownList,
+    org.apache.flex.core.ListBase);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js
index 05a2657..4875ab8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/Label.js
@@ -16,16 +16,18 @@ goog.provide('org.apache.flex.html5.staticControls.Label');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html5.staticControls.Label = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.Label, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.Label,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
@@ -33,25 +35,28 @@ goog.inherits(
  * @param {Object} p The parent element.
  */
 org.apache.flex.html5.staticControls.Label.prototype.addToParent = function(p) {
-    goog.base(this, 'addToParent', p);
+  goog.base(this, 'addToParent', p);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.Label}
  * @return {string} The text getter.
  */
 org.apache.flex.html5.staticControls.Label.prototype.get_text = function() {
-    return this.element.innerHTML;
+  return this.element.innerHTML;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.Label}
  * @param {string} value The text setter.
  */
-org.apache.flex.html5.staticControls.Label.prototype.set_text = function(value) {
-    this.element.innerHTML = value;
+org.apache.flex.html5.staticControls.Label.prototype.set_text =
+    function(value) {
+  this.element.innerHTML = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/List.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/List.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/List.js
index 5675115..3375e46 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/List.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/List.js
@@ -16,23 +16,18 @@ goog.provide('org.apache.flex.html5.staticControls.List');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html5.staticControls.List = function() {
-    org.apache.flex.core.UIBase.call(this);
-
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this._dataProvider;
-
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.List, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.List,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
@@ -40,107 +35,7 @@ goog.inherits(
  * @param {Object} p The parent element.
  */
 org.apache.flex.html5.staticControls.List.prototype.addToParent = function(p) {
-    this.element = document.createElement('select');
-    this.element.onChange = org.apache.flex.FlexGlobal.createProxy(
-                this, this.changeHandler);
-    this.element.size = 5;
-                
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.List}
- * @return {Array.<Object>} The collection of data.
- */
-org.apache.flex.html5.staticControls.List.prototype.get_dataProvider =
-function() {
-    return this._dataProvider;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.List}
- * @param {Array.<Object>} value The text setter.
- */
-org.apache.flex.html5.staticControls.List.prototype.set_dataProvider =
-function(value) {
-    this._dataProvider = value;
-
-    var dp = this.element.options;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-        dp.remove(0);
-
-    n = value.length;
-    for (i = 0; i < n; i++)
-    {
-        var opt = document.createElement('option');
-        opt.text = value[i];
-        dp.add(opt);
-    }
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.List}
- * @return {int} The selected index.
- */
-org.apache.flex.html5.staticControls.List.prototype.get_selectedIndex =
-function() {
-    return this.element.selectedIndex;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.List}
- * @param {int} value The selected index.
- */
-org.apache.flex.html5.staticControls.List.prototype.set_selectedIndex =
-function(value) {
-    this.element.selectedIndex = value;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.List}
- * @return {Object} The selected item.
- */
-org.apache.flex.html5.staticControls.List.prototype.get_selectedItem =
-function() {
-    return this._dataProvider[this.element.selectedIndex];
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html5.staticControls.List}
- * @param {Object} value The selected item.
- */
-org.apache.flex.html5.staticControls.List.prototype.set_selectedItem =
-function(value) {
+  goog.base(this, 'addToParent', p);
 
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (dp[i] == value)
-            break;
-    }
-    if (i < n)
-        this.element.selectedIndex = i;
+  this.element.size = 5;
 };
-
-/**
- * @protected
- * @this {org.apache.flex.html5.staticControls.List}
- * @return {Object} The selected item.
- */
-org.apache.flex.html5.staticControls.List.prototype.changeHandler =
-function() {
-    evt = document.createEvent('Event');
-    evt.initEvent('change', false, false);
-    this.element.dispatchEvent(evt);
-};
-

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/RadioButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/RadioButton.js
index 971ac86..9df7bb3 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/RadioButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/RadioButton.js
@@ -16,88 +16,102 @@ goog.provide('org.apache.flex.html5.staticControls.RadioButton');
 
 goog.require('org.apache.flex.core.UIBase');
 
-var rbCount = 0;
+
 
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html5.staticControls.RadioButton = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.RadioButton, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.RadioButton,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html5.staticControls.RadioButton}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html5.staticControls.RadioButton.prototype.addToParent = 
+org.apache.flex.html5.staticControls.RadioButton.prototype.addToParent =
     function(p) {
-	this.element = document.createElement('label');
-	
-	var rb = document.createElement('input');
-	rb.type = 'radio';
-	this.element.appendChild(rb);
-	this.element.appendChild(document.createTextNode("radio button"));
+  var rb;
+
+  this.element = document.createElement('label');
 
-    p.appendChild(this.element);
+  rb = document.createElement('input');
+  rb.type = 'radio';
+  this.element.appendChild(rb);
+  this.element.appendChild(document.createTextNode('radio button'));
 
-    this.positioner = this.element;
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.RadioButton}
  * @return {string} The groupName getter.
  */
-org.apache.flex.html5.staticControls.RadioButton.prototype.get_groupName = function() {
-    return this.element.childNodes.item(0).name;
+org.apache.flex.html5.staticControls.RadioButton.prototype.get_groupName =
+    function() {
+  return this.element.childNodes.item(0).name;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.RadioButton}
  * @param {string} value The groupName setter.
  */
-org.apache.flex.html5.staticControls.RadioButton.prototype.set_groupName = function(value) {
-    this.element.childNodes.item(0).name = value;
+org.apache.flex.html5.staticControls.RadioButton.prototype.set_groupName =
+    function(value) {
+  this.element.childNodes.item(0).name = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.RadioButton}
  * @return {string} The text getter.
  */
-org.apache.flex.html5.staticControls.RadioButton.prototype.get_text = function() {
-    return this.element.childNodes.item(1).nodeValue;
+org.apache.flex.html5.staticControls.RadioButton.prototype.get_text =
+    function() {
+  return this.element.childNodes.item(1).nodeValue;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.RadioButton}
  * @param {string} value The text setter.
  */
-org.apache.flex.html5.staticControls.RadioButton.prototype.set_text = function(value) {
-    this.element.childNodes.item(1).nodeValue = value;
+org.apache.flex.html5.staticControls.RadioButton.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(1).nodeValue = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.RadioButton}
  * @return {bool} The selected getter.
  */
-org.apache.flex.html5.staticControls.RadioButton.prototype.get_selected = function() {
-    return this.element.childNodes.item(0).checked;
+org.apache.flex.html5.staticControls.RadioButton.prototype.get_selected =
+    function() {
+  return this.element.childNodes.item(0).checked;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.RadioButton}
  * @param {bool} value The selected setter.
  */
-org.apache.flex.html5.staticControls.RadioButton.prototype.set_selected = function(value) {
-    this.element.childNodes.item(0).checked = value;
+org.apache.flex.html5.staticControls.RadioButton.prototype.set_selected =
+    function(value) {
+  this.element.childNodes.item(0).checked = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js
index 399474a..8aabd64 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextArea.js
@@ -16,45 +16,50 @@ goog.provide('org.apache.flex.html5.staticControls.TextArea');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html5.staticControls.TextArea = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.TextArea, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.TextArea,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html5.staticControls.TextArea}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html5.staticControls.TextArea.prototype.addToParent = 
+org.apache.flex.html5.staticControls.TextArea.prototype.addToParent =
     function(p) {
-    this.element = document.createElement('textarea');
+  this.element = document.createElement('textarea');
 
-    p.appendChild(this.element);
+  p.appendChild(this.element);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.TextArea}
  * @return {string} The text getter.
  */
 org.apache.flex.html5.staticControls.TextArea.prototype.get_text = function() {
-    return this.element.value
+  return this.element.value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.TextArea}
  * @param {string} value The text setter.
  */
-org.apache.flex.html5.staticControls.TextArea.prototype.set_text = function(value) {
-    this.element.value = value;
+org.apache.flex.html5.staticControls.TextArea.prototype.set_text =
+    function(value) {
+  this.element.value = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js
index f39d5b0..c0cad37 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextButton.js
@@ -16,16 +16,18 @@ goog.provide('org.apache.flex.html5.staticControls.TextButton');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html5.staticControls.TextButton = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.TextButton, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.TextButton,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
@@ -34,23 +36,26 @@ goog.inherits(
  */
 org.apache.flex.html5.staticControls.TextButton.prototype.addToParent =
     function(p) {
-    this.element = document.createElement('button');
-    this.element.setAttribute('type', 'button');
+  this.element = document.createElement('button');
+  this.element.setAttribute('type', 'button');
 
-    p.appendChild(this.element);
+  p.appendChild(this.element);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.TextButton}
  * @return {string} The text getter.
  */
-org.apache.flex.html5.staticControls.TextButton.prototype.get_text = function() {
-    return this.element.innerHTML;
+org.apache.flex.html5.staticControls.TextButton.prototype.get_text =
+    function() {
+  return this.element.innerHTML;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.TextButton}
@@ -58,5 +63,5 @@ org.apache.flex.html5.staticControls.TextButton.prototype.get_text = function()
  */
 org.apache.flex.html5.staticControls.TextButton.prototype.set_text =
     function(value) {
-    this.element.innerHTML = value;
+  this.element.innerHTML = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js
index 675ae67..b093b98 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/TextInput.js
@@ -16,46 +16,51 @@ goog.provide('org.apache.flex.html5.staticControls.TextInput');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html5.staticControls.TextInput = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.TextInput, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.TextInput,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html5.staticControls.TextInput}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html5.staticControls.TextInput.prototype.addToParent = 
+org.apache.flex.html5.staticControls.TextInput.prototype.addToParent =
     function(p) {
-    this.element = document.createElement('input');
-    this.element.setAttribute('type', 'input');
+  this.element = document.createElement('input');
+  this.element.setAttribute('type', 'input');
 
-    p.appendChild(this.element);
+  p.appendChild(this.element);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.TextInput}
  * @return {string} The text getter.
  */
 org.apache.flex.html5.staticControls.TextInput.prototype.get_text = function() {
-    return this.element.value
+  return this.element.value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.TextInput}
  * @param {string} value The text setter.
  */
-org.apache.flex.html5.staticControls.TextInput.prototype.set_text = function(value) {
-    this.element.value = value;
+org.apache.flex.html5.staticControls.TextInput.prototype.set_text =
+    function(value) {
+  this.element.value = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js
index 8576c9e..e6eb0f8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/Application.js
@@ -16,129 +16,99 @@
 // jQuery
 // ------------------------------------------------------------------
 
+// (erikdebruin) do these have to be in the global namespace?
+var head, link, mainjs, uijs;
+
 // Bring in the jQuery sources. You can use the minified versions for
 // better performance.
- var mainjs = document.createElement('script');
-mainjs.src = 'http://code.jquery.com/jquery-1.9.1.js';
+mainjs = document.createElement('script');
+/** @type {Object} */ mainjs.src = 'http://code.jquery.com/jquery-1.9.1.js';
 document.head.appendChild(mainjs);
 
- var uijs = document.createElement('script');
-uijs.src = 'http://code.jquery.com/ui/1.10.2/jquery-ui.js';
-document.head.appendChild(uijs); 
+uijs = document.createElement('script');
+/** @type {Object} */ uijs.src =
+    'http://code.jquery.com/ui/1.10.2/jquery-ui.js';
+document.head.appendChild(uijs);
 
 // create a stylesheet link to the corresponding jquery theme file.
-var head  = document.getElementsByTagName('head')[0];
-var link  = document.createElement('link');
-link.id   = 'jquerycss';
-link.rel  = 'stylesheet';
-link.type = 'text/css';
-link.href = 'http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css';
-link.media = 'all';
+head = document.getElementsByTagName('head')[0];
+link = document.createElement('link');
+/** @type {Object} */ link.id = 'jquerycss';
+/** @type {Object} */ link.rel = 'stylesheet';
+/** @type {Object} */ link.type = 'text/css';
+/** @type {Object} */ link.href =
+    'http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css';
+/** @type {Object} */ link.media = 'all';
 head.appendChild(link);
 
 // ------------------------------------------------------------------
 // end jQuery
 // ------------------------------------------------------------------
- 
+
 goog.provide('org.apache.flex.jquery.Application');
 
 goog.require('org.apache.flex.core.HTMLElementWrapper');
-
-goog.require('org.apache.flex.core.SimpleValuesImpl');
-goog.require('org.apache.flex.core.ValuesManager');
-goog.require('org.apache.flex.core.ViewBase');
 goog.require('org.apache.flex.utils.MXMLDataInterpreter');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.HTMLElementWrapper}
  */
 org.apache.flex.jquery.Application = function() {
-    org.apache.flex.core.HTMLElementWrapper.call(this);
-
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this.queuedListeners_;
+  goog.base(this);
 
 };
 goog.inherits(org.apache.flex.jquery.Application,
     org.apache.flex.core.HTMLElementWrapper);
 
+
 /**
  * @expose
  * @type {Object}
  */
 org.apache.flex.jquery.Application.prototype.controller = null;
 
+
 /**
  * @expose
  * @type {org.apache.flex.core.ViewBase}
  */
 org.apache.flex.jquery.Application.prototype.initialView = null;
 
+
 /**
  * @expose
  * @type {org.apache.flex.events.EventDispatcher}
  */
 org.apache.flex.jquery.Application.prototype.model = null;
 
+
 /**
  * @expose
  * @type {org.apache.flex.core.SimpleValuesImpl}
  */
 org.apache.flex.jquery.Application.prototype.valuesImpl = null;
 
-/**
- * @this {org.apache.flex.jquery.Application}
- * @param {string} t The event type.
- * @param {function(?): ?} fn The event handler.
- */
-org.apache.flex.jquery.Application.prototype.addEventListener = function(t, fn) {
-    if (!this.element) {
-        if (!this.queuedListeners_) {
-            this.queuedListeners_ = [];
-        }
-
-        this.queuedListeners_.push({ type: t, handler: fn });
-
-        return;
-    }
-
-    goog.base(this, 'addEventListener', t, fn);
-};
 
 /**
  * @expose
  * @this {org.apache.flex.jquery.Application}
  */
 org.apache.flex.jquery.Application.prototype.start = function() {
-    var evt, i, n, q;
-
-    this.element = document.getElementsByTagName('body')[0];
-
-    if (this.queuedListeners_) {
-        n = this.queuedListeners_.length;
-        for (i = 0; i < n; i++) {
-            q = this.queuedListeners_[i];
-
-            this.addEventListener(q.type, q.handler);
-        }
-    }
+  var evt, i, n, q;
 
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
-            this.get_MXMLProperties());
+  this.element = document.getElementsByTagName('body')[0];
 
-    org.apache.flex.core.ValuesManager.valuesImpl = this.valuesImpl;
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
+      this.get_MXMLProperties());
 
-    evt = this.createEvent('initialize');
-    this.dispatchEvent(evt);
+  this.dispatchEvent('initialize');
 
-    this.initialView.addToParent(this.element);
-    this.initialView.initUI(this.model);
+  this.initialView.addToParent(this.element);
+  this.initialView.initUI(this.model);
 
-    evt = this.createEvent('viewChanged');
-    this.dispatchEvent(evt);
+  this.dispatchEvent('viewChanged');
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js
index 2a979c0..b46b457 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/CheckBox.js
@@ -16,79 +16,87 @@ goog.provide('org.apache.flex.jquery.staticControls.CheckBox');
 
 goog.require('org.apache.flex.core.UIBase');
 
-var cbCount = 0;
+
 
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.jquery.staticControls.CheckBox = function() {
-    org.apache.flex.core.UIBase.call(this);
-  
+  goog.base(this);
+
 };
-goog.inherits(
-    org.apache.flex.jquery.staticControls.CheckBox, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.jquery.staticControls.CheckBox,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.jquery.staticControls.CheckBox}
  * @param {Object} p The parent element.
  */
-org.apache.flex.jquery.staticControls.CheckBox.prototype.addToParent = 
+org.apache.flex.jquery.staticControls.CheckBox.prototype.addToParent =
     function(p) {
-    
-    var d = document.createElement('div');
-    var cb = document.createElement('input');
-    cb.type = 'checkbox';
-    cb.id = 'checkbox1';
-    
-    var lb = document.createElement('label');
-    lb.htmlFor = 'checkbox1';
-    
-    d.appendChild(cb);
-    d.appendChild(lb);
-    
-    this.element = d;
-    p.appendChild(this.element);
-    
-    $(cb).button();
-
-    this.positioner = this.element;
+  var cb, d, lb;
+
+  d = document.createElement('div');
+  cb = document.createElement('input');
+  cb.type = 'checkbox';
+  cb.id = 'checkbox1';
+
+  lb = document.createElement('label');
+  lb.htmlFor = 'checkbox1';
+
+  d.appendChild(cb);
+  d.appendChild(lb);
+
+  this.element = d;
+  p.appendChild(this.element);
+
+  $(cb).button();
+
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.CheckBox}
  * @return {string} The text getter.
  */
 org.apache.flex.jquery.staticControls.CheckBox.prototype.get_text = function() {
-    return this.element.childNodes.item(1).value;
+  return this.element.childNodes.item(1).value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.CheckBox}
  * @param {string} value The text setter.
  */
-org.apache.flex.jquery.staticControls.CheckBox.prototype.set_text = function(value) {
-    this.element.childNodes.item(1).appendChild(document.createTextNode(value));;
+org.apache.flex.jquery.staticControls.CheckBox.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(1).appendChild(document.createTextNode(value));
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.CheckBox}
  * @return {bool} The selected getter.
  */
-org.apache.flex.jquery.staticControls.CheckBox.prototype.get_selected = function() {
-    return this.element.childNodes.item(0).checked;
+org.apache.flex.jquery.staticControls.CheckBox.prototype.get_selected =
+    function() {
+  return this.element.childNodes.item(0).checked;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.CheckBox}
  * @param {bool} value The selected setter.
  */
-org.apache.flex.jquery.staticControls.CheckBox.prototype.set_selected = function(value) {
-    this.element.childNodes.item(0).checked = value;
+org.apache.flex.jquery.staticControls.CheckBox.prototype.set_selected =
+    function(value) {
+  this.element.childNodes.item(0).checked = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js
index b1eeef6..35d2371 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/RadioButton.js
@@ -16,89 +16,103 @@ goog.provide('org.apache.flex.jquery.staticControls.RadioButton');
 
 goog.require('org.apache.flex.core.UIBase');
 
-var rbCount = 0;
+
 
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.jquery.staticControls.RadioButton = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.jquery.staticControls.RadioButton, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.jquery.staticControls.RadioButton,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.jquery.staticControls.RadioButton}
  * @param {Object} p The parent element.
  */
-org.apache.flex.jquery.staticControls.RadioButton.prototype.addToParent = 
+org.apache.flex.jquery.staticControls.RadioButton.prototype.addToParent =
     function(p) {
-	this.element = document.createElement('label');
-	
-	var rb = document.createElement('input');
-	rb.type = 'radio';
-	$(rb).button();
-	this.element.appendChild(rb);
-	this.element.appendChild(document.createTextNode("radio button"));
+  var rb;
+
+  this.element = document.createElement('label');
 
-    p.appendChild(this.element);
+  rb = document.createElement('input');
+  rb.type = 'radio';
+  $(rb).button();
+  this.element.appendChild(rb);
+  this.element.appendChild(document.createTextNode('radio button'));
 
-    this.positioner = this.element;
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.RadioButton}
  * @return {string} The groupName getter.
  */
-org.apache.flex.jquery.staticControls.RadioButton.prototype.get_groupName = function() {
-    return this.element.childNodes.item(0).name;
+org.apache.flex.jquery.staticControls.RadioButton.prototype.get_groupName =
+    function() {
+  return this.element.childNodes.item(0).name;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.RadioButton}
  * @param {string} value The groupName setter.
  */
-org.apache.flex.jquery.staticControls.RadioButton.prototype.set_groupName = function(value) {
-    this.element.childNodes.item(0).name = value;
+org.apache.flex.jquery.staticControls.RadioButton.prototype.set_groupName =
+    function(value) {
+  this.element.childNodes.item(0).name = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.RadioButton}
  * @return {string} The text getter.
  */
-org.apache.flex.jquery.staticControls.RadioButton.prototype.get_text = function() {
-    return this.element.childNodes.item(1).nodeValue;
+org.apache.flex.jquery.staticControls.RadioButton.prototype.get_text =
+    function() {
+  return this.element.childNodes.item(1).nodeValue;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.RadioButton}
  * @param {string} value The text setter.
  */
-org.apache.flex.jquery.staticControls.RadioButton.prototype.set_text = function(value) {
-    this.element.childNodes.item(1).nodeValue = value;
+org.apache.flex.jquery.staticControls.RadioButton.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(1).nodeValue = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.RadioButton}
  * @return {bool} The selected getter.
  */
-org.apache.flex.jquery.staticControls.RadioButton.prototype.get_selected = function() {
-    return this.element.childNodes.item(0).checked;
+org.apache.flex.jquery.staticControls.RadioButton.prototype.get_selected =
+    function() {
+  return this.element.childNodes.item(0).checked;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.RadioButton}
  * @param {bool} value The selected setter.
  */
-org.apache.flex.jquery.staticControls.RadioButton.prototype.set_selected = function(value) {
-    this.element.childNodes.item(0).checked = value;
+org.apache.flex.jquery.staticControls.RadioButton.prototype.set_selected =
+    function(value) {
+  this.element.childNodes.item(0).checked = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js
index 4cb2059..a47974c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/jquery/staticControls/TextButton.js
@@ -16,16 +16,18 @@ goog.provide('org.apache.flex.jquery.staticControls.TextButton');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.jquery.staticControls.TextButton = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.jquery.staticControls.TextButton, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.jquery.staticControls.TextButton,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
@@ -34,23 +36,26 @@ goog.inherits(
  */
 org.apache.flex.jquery.staticControls.TextButton.prototype.addToParent =
     function(p) {
-    this.element = document.createElement('button');
-    this.element.setAttribute('type', 'button');
-	$(this.element).button();
-    p.appendChild(this.element);
+  this.element = document.createElement('button');
+  this.element.setAttribute('type', 'button');
+  $(this.element).button();
+  p.appendChild(this.element);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.TextButton}
  * @return {string} The text getter.
  */
-org.apache.flex.jquery.staticControls.TextButton.prototype.get_text = function() {
-    return this.element.innerHTML;
+org.apache.flex.jquery.staticControls.TextButton.prototype.get_text =
+    function() {
+  return this.element.innerHTML;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.jquery.staticControls.TextButton}
@@ -58,5 +63,5 @@ org.apache.flex.jquery.staticControls.TextButton.prototype.get_text = function()
  */
 org.apache.flex.jquery.staticControls.TextButton.prototype.set_text =
     function(value) {
-    this.element.innerHTML = value;
+  this.element.innerHTML = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js b/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js
index b80d083..a8ba162 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPHeader.js
@@ -14,27 +14,30 @@
 
 goog.provide('org.apache.flex.net.HTTPHeader');
 
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
+ * @param {string=} opt_name The name.
+ * @param {string=} opt_value The value.
  */
-org.apache.flex.net.HTTPHeader = function(name, value) {
-    org.apache.flex.FlexObject.call(this);
+org.apache.flex.net.HTTPHeader = function(opt_name, opt_value) {
+  if (typeof opt_name !== 'undefined') {
+    this.name = opt_name;
+  }
 
-    if (typeof(name) != "undefined")
-        this.name = name;
-    if (typeof(value) != "undefined")
-        this.value = value;
+  if (typeof opt_value !== 'undefined') {
+    this.value = opt_value;
+  }
 };
-goog.inherits(org.apache.flex.net.HTTPHeader, org.apache.flex.FlexObject);
+
 
 /**
  * @expose
- * @type {String}
+ * @type {string}
  */
-org.apache.flex.net.HTTPHeader.CONTENT_TYPE = "Content-type";
+org.apache.flex.net.HTTPHeader.CONTENT_TYPE = 'Content-type';
+
 
 /**
  * @expose
@@ -42,6 +45,7 @@ org.apache.flex.net.HTTPHeader.CONTENT_TYPE = "Content-type";
  */
 org.apache.flex.net.HTTPHeader.prototype.value;
 
+
 /**
  * @expose
  * @type {string}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 8c87ae6..e61bcb4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/HTTPService.js
@@ -1,12 +1,12 @@
 /**
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the 'License');
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
+ * distributed under the License is distributed on an 'AS IS' BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
@@ -14,105 +14,110 @@
 
 goog.provide('org.apache.flex.net.HTTPService');
 
-goog.require('org.apache.flex.FlexGlobal');
 goog.require('org.apache.flex.core.HTMLElementWrapper');
 goog.require('org.apache.flex.net.HTTPHeader');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.HTMLElementWrapper}
  */
 org.apache.flex.net.HTTPService = function() {
-    org.apache.flex.core.HTMLElementWrapper.call(this);
-
-    /**
-     * @protected
-     * @type {String}
-     */
-    this._url;
-
-    /**
-     * @private
-     * @type {Number}
-     */
-    this._status;
-
-    /**
-     * @private
-     * @type {String}
-     */
-    this._method = "GET";
-
-    /**
-     * @private
-     * @type {Array}
-     */
-    this._headers;
-
-    /**
-     * @private
-     * @type {Array}
-     */
-    this._responseHeaders;
-
-    /**
-     * @private
-     * @type {String}
-     */
-    this._responseURL;
-
-    /**
-     * @private
-     * @type {Number}
-     */
-    this._timeout = 0;
-
-    /**
-     * @private
-     * @type {String}
-     */
-    this._contentData;
-
-    /**
-     * @private
-     * @type {String}
-     */
-    this._contentType = "application/x-www-form-urlencoded";
-
-    /**
-     * @private
-     * @type {XMLHttpRequest}
-     */
-    this.element;
-
-    this.element = new XMLHttpRequest();
+  goog.base(this);
+
+  /**
+   * @protected
+   * @type {string}
+   */
+  this.url_;
+
+  /**
+   * @private
+   * @type {Number}
+   */
+  this.status_;
+
+  /**
+   * @private
+   * @type {string}
+   */
+  this.method_ = 'GET';
+
+  /**
+   * @private
+   * @type {Array}
+   */
+  this.headers_;
+
+  /**
+   * @private
+   * @type {Array}
+   */
+  this.responseHeaders_;
+
+  /**
+   * @private
+   * @type {string}
+   */
+  this.responseURL_;
+
+  /**
+   * @private
+   * @type {Number}
+   */
+  this.timeout_ = 0;
+
+  /**
+   * @private
+   * @type {string}
+   */
+  this.contentData_;
+
+  /**
+   * @private
+   * @type {string}
+   */
+  this.contentType_ = 'application/x-www-form-urlencoded';
+
+  //try { // (erikdebruin) 'desperate' attempt to bypass XDR security in IE < 10
+  //  this.contentType_ = 'text/plain';
+  //  this.element = new XDomainRequest();
+  //} catch (e) {}
+
+  this.element = new XMLHttpRequest();
 };
 goog.inherits(org.apache.flex.net.HTTPService,
     org.apache.flex.core.HTMLElementWrapper);
 
+
 /**
  * @expose
- * @type {String}
+ * @type {string}
  */
-org.apache.flex.net.HTTPService.HTTP_METHOD_GET = "GET";
+org.apache.flex.net.HTTPService.HTTP_METHOD_GET = 'GET';
+
 
 /**
  * @expose
- * @type {String}
+ * @type {string}
  */
-org.apache.flex.net.HTTPService.HTTP_METHOD_POST = "POST";
+org.apache.flex.net.HTTPService.HTTP_METHOD_POST = 'POST';
+
 
 /**
  * @expose
- * @type {String}
+ * @type {string}
  */
-org.apache.flex.net.HTTPService.HTTP_METHOD_PUT = "PUT";
+org.apache.flex.net.HTTPService.HTTP_METHOD_PUT = 'PUT';
+
 
 /**
  * @expose
- * @type {String}
+ * @type {string}
  */
-org.apache.flex.net.HTTPService.HTTP_METHOD_DELETE = "DELETE";
+org.apache.flex.net.HTTPService.HTTP_METHOD_DELETE = 'DELETE';
+
 
 /**
  * @expose
@@ -120,331 +125,279 @@ org.apache.flex.net.HTTPService.HTTP_METHOD_DELETE = "DELETE";
  * @return {string} value The data.
  */
 org.apache.flex.net.HTTPService.prototype.get_data = function() {
-    return this.element.responseText;
+  return this.element.responseText;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {string} value The contentData.
  */
 org.apache.flex.net.HTTPService.prototype.get_contentData = function() {
-    return this._contentData;
+  return this.contentData_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @param {string} value The contentData.
  */
 org.apache.flex.net.HTTPService.prototype.set_contentData = function(value) {
-    this._contentData = value;
+  this.contentData_ = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {string} value The contentType.
  */
 org.apache.flex.net.HTTPService.prototype.get_contentType = function() {
-    return this._contentType;
+  return this.contentType_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @param {string} value The contentType.
  */
 org.apache.flex.net.HTTPService.prototype.set_contentType = function(value) {
-    this._contentType = value;
+  this.contentType_ = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {Array} value The array of HTTPHeaders.
  */
 org.apache.flex.net.HTTPService.prototype.get_headers = function() {
-    if (this._headers == undefined)
-        this._headers = [];
-    return this._headers;
+  if (this.headers_ === 'undefined') {
+    this.headers_ = [];
+  }
+
+  return this.headers_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @param {Array} value The array of HTTPHeaders.
  */
 org.apache.flex.net.HTTPService.prototype.set_headers = function(value) {
-    this._headers = value;
+  this.headers_ = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
- * @return {String} value The method.
+ * @return {string} value The method.
  */
 org.apache.flex.net.HTTPService.prototype.get_method = function() {
-    return this._method;
+  return this.method_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
- * @param {String} value The method.
+ * @param {string} value The method.
  */
 org.apache.flex.net.HTTPService.prototype.set_method = function(value) {
-    this._method = value;
+  this.method_ = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {Array} value The array of HTTPHeaders.
  */
 org.apache.flex.net.HTTPService.prototype.get_responseHeaders = function() {
-    if (typeof this._responseHeaders == 'undefined')
-    {
-        var allHeaders = this.element.getAllResponseHeaders();
-        this._responseHeaders = allHeaders.split('\n');
-        var n = this._responseHeaders.length;
-        for (var i = 0; i < n; i++)
-        {
-            var hdr = this._responseHeaders[i];
-            var c = hdr.indexOf(':');
-            var part1 = hdr.substring(0, c);
-            var part2 = hdr.substring(c + 2);
-            this._responseHeaders[i] = new org.apache.flex.net.HTTPHeader(part1, part2);
-        }
+  var allHeaders, c, hdr, i, n, part1, part2;
+
+  if (typeof this.responseHeaders_ === 'undefined') {
+    allHeaders = this.element.getAllResponseHeaders();
+    this.responseHeaders_ = allHeaders.split('\n');
+    n = this.responseHeaders_.length;
+    for (i = 0; i < n; i++) {
+      hdr = this.responseHeaders_[i];
+      c = hdr.indexOf(':');
+      part1 = hdr.substring(0, c);
+      part2 = hdr.substring(c + 2);
+      this.responseHeaders_[i] =
+          new org.apache.flex.net.HTTPHeader(part1, part2);
     }
-    return this._responseHeaders;
+  }
+  return this.responseHeaders_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {string} value The url.
  */
 org.apache.flex.net.HTTPService.prototype.get_responseURL = function() {
-    return this._responseURL;
+  return this.responseURL_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {Number} value The status.
  */
 org.apache.flex.net.HTTPService.prototype.get_status = function() {
-    return this._status;
+  return this.status_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {Number} value The timeout.
  */
 org.apache.flex.net.HTTPService.prototype.get_timeout = function() {
-    return this._timeout;
+  return this.timeout_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @param {Number} value The timeout.
  */
 org.apache.flex.net.HTTPService.prototype.set_timeout = function(value) {
-    this._timeout = value;
+  this.timeout_ = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {string} value The url.
  */
 org.apache.flex.net.HTTPService.prototype.get_url = function() {
-    return this._url;
+  return this.url_;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @param {string} value The url to fetch.
  */
 org.apache.flex.net.HTTPService.prototype.set_url = function(value) {
-    this._url = value;
+  this.url_ = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  */
 org.apache.flex.net.HTTPService.prototype.send = function() {
-    this.element.onreadystatechange = org.apache.flex.FlexGlobal.createProxy(
-            this, this.progressHandler);
-    var url = this._url;
-    var contentData = null;
-    if (this._contentData != undefined)
-    {
-        if (this._method == org.apache.flex.net.HTTPService.HTTP_METHOD_GET)
-        {
-            if (url.indexOf("?") != -1)
-                url += this._contentData;
-            else
-                url += "?" + this._contentData;
-        }
-        else
-            contentData = this._contentData;
-    }
-    
-    this.element.open(this._method,this._url,true);
-    this.element.timeout = this._timeout;
-    var sawContentType = false;
-    if (this._headers)
-    {
-        var n = this._headers.length;
-        for (var i = 0; i < n; i++)
-        {
-            var header = this._headers[i];
-            if (header.name == org.apache.flex.net.HTTPHeader.CONTENT_TYPE)
-                sawContentType = true;
-            this.element.setRequestHeader(header.name, header.value);
-        }
+  var contentData, header, i, n, sawContentType, url;
+
+  this.element.onreadystatechange = goog.bind(this.progressHandler, this);
+
+  url = this.url_;
+
+  contentData = null;
+  if (this.contentData_ !== undefined) {
+    if (this.method_ === org.apache.flex.net.HTTPService.HTTP_METHOD_GET) {
+      if (url.indexOf('?') !== -1) {
+        url += this.contentData_;
+      } else {
+        url += '?' + this.contentData_;
+      }
+    } else {
+      contentData = this.contentData_;
     }
-    if (this._method != org.apache.flex.net.HTTPService.HTTP_METHOD_GET &&
-        !sawContentType && contentData != null)
-    {
-        this.element.setRequestHeader(org.apache.flex.net.HTTPHeader.CONTENT_TYPE,
-            this._contentType);
-    }
-    
-    if (contentData != null)
-    {
-        this.element.setRequestHeader("Content-length", contentData.length);
-        this.element.setRequestHeader("Connection", "close");
-        this.element.send(contentData);
+  }
+
+  this.element.open(this.method_, this.url_, true);
+  this.element.timeout = this.timeout_;
+
+  sawContentType = false;
+  if (this.headers_) {
+    n = this.headers_.length;
+    for (i = 0; i < n; i++) {
+      header = this.headers_[i];
+      if (header.name === org.apache.flex.net.HTTPHeader.CONTENT_TYPE) {
+        sawContentType = true;
+      }
+
+      this.element.setRequestHeader(header.name, header.value);
     }
-    else        
-        this.element.send();        
+  }
+
+  if (this.method_ !== org.apache.flex.net.HTTPService.HTTP_METHOD_GET &&
+      !sawContentType && contentData) {
+    this.element.setRequestHeader(
+        org.apache.flex.net.HTTPHeader.CONTENT_TYPE, this.contentType_);
+  }
+
+  if (contentData) {
+    this.element.setRequestHeader('Content-length', contentData.length);
+    this.element.setRequestHeader('Connection', 'close');
+    this.element.send(contentData);
+  } else {
+    this.element.send();
+  }
 };
 
+
 /**
  * @protected
  * @this {org.apache.flex.net.HTTPService}
  */
 org.apache.flex.net.HTTPService.prototype.progressHandler = function() {
-    var foo = this.element.readyState;
-    if (this.element.readyState == 2)
-    {
-        this._status = this.element.status;
-        var evt = this.createEvent('httpResponseStatus');
-        this.dispatchEvent(evt);
-        evt = this.createEvent('httpStatus');
-        this.dispatchEvent(evt);
-    }
-    else if (this.element.readyState == 4)
-    {
-        var evt = this.createEvent('complete');
-        this.dispatchEvent(evt);
-    }
+  if (this.element.readyState === 2) {
+    this.status_ = this.element.status;
+    this.dispatchEvent('httpResponseStatus');
+    this.dispatchEvent('httpStatus');
+  } else if (this.element.readyState === 4) {
+    this.dispatchEvent('complete');
+  }
 };
 
+
 /**
  * @expose
  * @type {string}
  */
 org.apache.flex.net.HTTPService.prototype.id;
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {string} The id.
  */
 org.apache.flex.net.HTTPService.prototype.get_id = function() {
-    return this.id;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.net.HTTPService}
- * @param {object} value The new id.
- */
-org.apache.flex.net.HTTPService.prototype.set_id = function(value) {
-    if (this.id != value)
-    {
-        this.id = value;
-        var evt = this.createEvent('idChanged');
-        this.dispatchEvent(evt);
-    }
-};
-
-/**
- * @expose
- * @this {org.apache.flex.net.dataConverters.LazyCollection}
- * @param {object} value The new host.
- */
-org.apache.flex.net.HTTPService.prototype.set_strand =
-function(value) {
-    if (this.strand != value)
-    {
-        this.strand = value;
-    }
+  return this.id;
 };
 
-/**
- * @expose
- * @this {org.apache.flex.net.HTTPService}
- * @param {object} bead The new bead.
- */
-org.apache.flex.net.HTTPService.prototype.addBead = function(bead) {
-    if (!this.strand)
-        this.strand = [];
-    this.strand.push(bead);
-    if (typeof(bead.constructor.$implements) != 'undefined' &&
-        typeof(bead.constructor.$implements.IBeadModel != 'undefined'))
-        this.model = bead;
-    bead.set_strand(this);
-};
 
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
- * @param {object} classOrInterface The requested bead type.
- * @return {object} The bead.
+ * @param {Object} value The new id.
  */
-org.apache.flex.net.HTTPService.prototype.getBeadByType =
-                                    function(classOrInterface) {
-    var n;
-    n = this.strand.length;
-    for (var i = 0; i < n; i++)
-    {
-        var bead = strand[i];
-        if (bead instanceof classOrInterface)
-            return bead;
-        if (classOrInterface in bead.constructor.$implements)
-            return bead;
-    }
-    return null;
+org.apache.flex.net.HTTPService.prototype.set_id = function(value) {
+  if (this.id !== value) {
+    this.id = value;
+    this.dispatchEvent('idChanged');
+  }
 };
 
-/**
- * @expose
- * @this {org.apache.flex.net.HTTPService}
- * @param {object} bead The bead to remove.
- * @return {object} The bead.
- */
-org.apache.flex.net.HTTPService.prototype.removeBead = function(bead) {
-    var n = this.strand.length;
-    for (var i = 0; i < n; i++)
-    {
-        var bead = strand[i];
-        if (bead == value)
-        {
-            this.strand.splice(i, 1);
-            return bead;
-        }
-    }
-    return null;
-};
 
 /**
  * @expose
@@ -452,25 +405,25 @@ org.apache.flex.net.HTTPService.prototype.removeBead = function(bead) {
  * @return {Array} The array of descriptors.
  */
 org.apache.flex.net.HTTPService.prototype.get_MXMLDescriptor = function() {
-    return null;
+  return null;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.HTTPService}
  * @return {Array} The array of properties.
  */
 org.apache.flex.net.HTTPService.prototype.get_MXMLProperties = function() {
-    return null;
+  return null;
 };
 
+
 /**
- * @this {org.apache.flex.binding.SimpleBinding}
- * @param {object} document The MXML object.
+ * @this {org.apache.flex.net.HTTPService}
+ * @param {Object} document The MXML object.
  * @param {string} id The id for the instance.
  */
-org.apache.flex.net.HTTPService.prototype.setDocument =
-                                                    function(document, id) {
-    this.document = document;
-
+org.apache.flex.net.HTTPService.prototype.setDocument = function(document, id) {
+  this.document = document;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
index 30ed7b0..16f7683 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js
@@ -14,17 +14,13 @@
 
 goog.provide('org.apache.flex.net.JSONInputParser');
 
-goog.require('org.apache.flex.FlexGlobal');
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.net.JSONInputParser = function() {
-    org.apache.flex.FlexObject.call(this);
 };
-goog.inherits(org.apache.flex.net.JSONInputParser, org.apache.flex.FlexObject);
 
 
 /**
@@ -34,5 +30,5 @@ goog.inherits(org.apache.flex.net.JSONInputParser, org.apache.flex.FlexObject);
  * @return {Array.<String>} The Array of unparsed objects.
  */
 org.apache.flex.net.JSONInputParser.prototype.parseItems = function(s) {
-    return s.split('},');
+  return s.split('},');
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
index 766a13c..c5b2dde 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONItemConverter.js
@@ -14,18 +14,13 @@
 
 goog.provide('org.apache.flex.net.JSONItemConverter');
 
-goog.require('org.apache.flex.FlexGlobal');
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.net.JSONItemConverter = function() {
-    org.apache.flex.FlexObject.call(this);
 };
-goog.inherits(org.apache.flex.net.JSONItemConverter,
-        org.apache.flex.FlexObject);
 
 
 /**
@@ -35,5 +30,5 @@ goog.inherits(org.apache.flex.net.JSONItemConverter,
  * @return {Object} The object.
  */
 org.apache.flex.net.JSONItemConverter.prototype.convertItem = function(s) {
-    return JSON.parse(s);
+  return JSON.parse(s);
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 52f5d47..5b85b56 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
@@ -14,159 +14,160 @@
 
 goog.provide('org.apache.flex.net.dataConverters.LazyCollection');
 
-goog.require('org.apache.flex.FlexGlobal');
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.net.dataConverters.LazyCollection = function() {
-    org.apache.flex.FlexObject.call(this);
-
-    /**
-     * @private
-     * @type {Object}
-     */
-    this._strand;
-
-    /**
-     * @private
-     * @type {Object}
-     */
-    this.data;
-
-    /**
-     * @private
-     * @type {Object}
-     */
-    this._inputParser;
-
-    /**
-     * @private
-     * @type {Object}
-     */
-
-    this._itemConverter;
-
-    /**
-     * @private
-     * @type {Object}
-     */
-    this.data;
+  /**
+   * @private
+   * @type {Object}
+   */
+  this.data_;
+
+  /**
+   * @private
+   * @type {Object}
+   */
+
+  this.itemConverter_;
+
+  /**
+   * @private
+   * @type {Object}
+   */
+  this.inputParser_;
+
+  /**
+   * @private
+   * @type {Object}
+   */
+  this.rawData_;
+
+  /**
+   * @private
+   * @type {Object}
+   */
+  this.strand_;
 };
-goog.inherits(org.apache.flex.net.dataConverters.LazyCollection,
-                org.apache.flex.FlexObject);
 
 
 /**
  * @expose
- * @this {org.apache.flex.core.HTTPService}
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
  * @return {string} value The input parser.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.get_inputParser =
-function() {
-    return this._inputParser;
+    function() {
+  return this.inputParser_;
 };
 
+
 /**
  * @expose
- * @this {org.apache.flex.core.HTTPService}
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
  * @param {string} value The input parser.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.set_inputParser =
-function(value) {
-    this._inputParser = value;
+    function(value) {
+  this.inputParser_ = value;
 };
 
+
 /**
  * @expose
- * @this {org.apache.flex.core.HTTPService}
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
  * @return {string} value The input parser.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.get_itemConverter =
-function() {
-    return this._itemConverter;
+    function() {
+  return this.itemConverter_;
 };
 
+
 /**
  * @expose
- * @this {org.apache.flex.core.HTTPService}
+ * @this {org.apache.flex.net.dataConverters.LazyCollection}
  * @param {string} value The input parser.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.set_itemConverter =
-function(value) {
-    this._itemConverter = value;
+    function(value) {
+  this.itemConverter_ = value;
 };
 
+
 /**
  * @expose
  * @type {string}
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.id;
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.dataConverters.LazyCollection}
  * @return {string} The id.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.get_id =
-function() {
-    return this.id;
+    function() {
+  return this.id;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.dataConverters.LazyCollection}
- * @param {object} value The new id.
+ * @param {Object} value The new id.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.set_id =
-function(value) {
-    if (this.id != value)
-    {
-        this.id = value;
-        // this.dispatchEvent(new Event('idChanged'));
-    }
+    function(value) {
+  if (this.id !== value) {
+    this.id = value;
+    // this.dispatchEvent(new Event('idChanged'));
+  }
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.dataConverters.LazyCollection}
- * @param {object} value The new host.
+ * @param {Object} value The new host.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.set_strand =
-function(value) {
-    if (this._strand != value)
-    {
-        this._strand = value;
-        this._strand.addEventListener('complete',
-            org.apache.flex.FlexGlobal.createProxy(
-                this, this.completeHandler));
-    }
+    function(value) {
+  if (this.strand_ !== value) {
+    this.strand_ = value;
+    this.strand_.addEventListener('complete',
+        goog.bind(this.completeHandler, this));
+  }
 };
 
+
 /**
  * @protected
  * @this {org.apache.flex.net.dataConverters.LazyCollection}
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.completeHandler =
-function() {
-    var results = this._strand.get_data();
-    this._rawData = this._inputParser.parseItems(results);
-    this.data = [];
+    function() {
+  var results = this.strand_.get_data();
+  this.rawData_ = this.inputParser_.parseItems(results);
+  this.data_ = [];
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.net.dataConverters.LazyCollection}
- * @param {int} index The index in the collection.
- * @return {object} An item in the collection.
+ * @param {number} index The index in the collection.
+ * @return {Object} An item in the collection.
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.getItemAt =
-function(index) {
-    if (this.data[index] == undefined)
-    {
-        this.data[index] = this._itemConverter.convertItem(this._rawData[index]);
-    }
-    return this.data[index];
+    function(index) {
+  if (typeof this.data_[index] === 'undefined') {
+    this.data_[index] =
+        this.itemConverter_.convertItem(this.rawData_[index]);
+  }
+
+  return this.data_[index];
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/utils/IE8Utils.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/IE8Utils.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/IE8Utils.js
deleted file mode 100644
index 0689c63..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/IE8Utils.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-goog.provide('org.apache.flex.utils.IE8Utils');
-
-/**
- * @constructor
- * @extends {org.apache.flex.events.EventDispatcher}
- */
-org.apache.flex.utils.IE8Utils = function(obj, fn) {
-    /*
-    obj.attachEvent("onmousedown", 
-        org.apache.flex.FlexGlobals.createProxy(this, this.mouseDownHandler));
-    obj.attachEvent("onmouseup", 
-        org.apache.flex.FlexGlobals.createProxy(this, this.mouseUpHandler));
-    obj.attachEvent("onmouseup", 
-        org.apache.flex.FlexGlobals.createProxy(this, this.mouseUpHandler));
-        */
-};
-
-/**
- * @expose
- * Adds an event listener for IE8
- * @param {object} obj The object that we're adding a listener to.
- * @param {object} el The html element we listen to if possible.
- * @param {string} t The event type.
- * @param {function(?): ?} fn The event handler.
- */
-org.apache.flex.utils.IE8Utils.addEventListener = function(obj, el, t, fn) {
-    var ie8Event = org.apache.flex.utils.IE8Utils.EventMap[t];
-    if (ie8Event == undefined)
-    {
-        if (obj.listeners_ == undefined)
-            obj.listeners_ = {};
-        
-        if (obj.listeners_[t] == undefined)
-        {
-            obj.listeners_[t] = [ fn ];
-        }
-        else
-            obj.listeners_[t].push(fn);
-    /*
-        if (t == "click")
-        {
-            var proxy = new org.apache.flex.utils.IE8Utils(obj, fn);
-        }
-    */
-    }
-    else
-        el.attachEvent(ie8Event, fn);
-};
-
-/**
- * @expose
- * Dispatches an event for IE8
- * @param {object} obj The object that we're dispatching from.
- * @param {object} el The html element we listen to if possible.
- * @param {object} event The event object.
- */
-org.apache.flex.utils.IE8Utils.dispatchEvent = function(obj, el, event) {
-    var ie8Event = org.apache.flex.utils.IE8Utils.EventMap[event.type];
-    if (ie8Event == undefined)
-    {
-        var arr, i, n, type;
-
-        type = event.type;
-
-        if (obj.listeners_ && obj.listeners_[type]) {
-            arr = obj.listeners_[type];
-            n = arr.length;
-            for (i = 0; i < n; i++) {
-                arr[i](event);
-            }
-        }
-    }
-    else
-        el.fireEvent(ie8Event, event);
-};
-
-
-/**
- * @enum {string}
- */
-org.apache.flex.utils.IE8Utils.EventMap = {
-    click: 'onclick',
-    change: 'onchange',
-    mouseUp: 'onmouseup',
-    mouseDown: 'onmousedown',
-    mouseMove: 'onmousemove',
-    mouseOver: 'onmouseover',
-    mouseOut: 'onmouseout'
-};
-


[8/9] git commit: [flex-asjs] [refs/heads/develop] - Update with Carlos' latest

Posted by er...@apache.org.
Update with Carlos' latest

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: cc97bbe4bce67a4cdcc6a34acb05aa58a7c4b8e6
Parents: f3ce06e
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Sat May 4 07:51:57 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Sat May 4 07:51:57 2013 +0200

----------------------------------------------------------------------
 .../src/org/apache/flex/binding/BindingBase.js     |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc97bbe4/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 08032a6..ab86b93 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
@@ -63,7 +63,12 @@ org.apache.flex.binding.BindingBase.prototype.sourcePropertyName = '';
 org.apache.flex.binding.BindingBase.prototype.set_strand = function(value) {
   this.destination = value;
 
-  this.source = this.document_[this.sourceID];
+  try {
+      this.source = this.document_['get_' + this.sourceID]();
+  } 
+  catch(e) {
+      this.source = this.document_[this.sourceID];
+  }
 };
 
 


[9/9] git commit: [flex-asjs] [refs/heads/develop] - Final GJSLint and JSLint modifications/minor corrections

Posted by er...@apache.org.
Final GJSLint and JSLint modifications/minor corrections

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 96fe140eccb0b60db6607eabbe720da37ee7592e
Parents: cc97bbe
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Sat May 4 20:12:29 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Sat May 4 20:12:29 2013 +0200

----------------------------------------------------------------------
 .../src/org/apache/flex/binding/BindingBase.js     |   13 +-
 .../src/org/apache/flex/binding/ConstantBinding.js |    3 +-
 .../src/org/apache/flex/binding/SimpleBinding.js   |    2 +-
 .../src/org/apache/flex/core/HTMLElementWrapper.js |    4 +-
 .../js/FlexJS/src/org/apache/flex/core/ListBase.js |   24 ++--
 .../js/FlexJS/src/org/apache/flex/core/UIBase.js   |   37 +++---
 .../src/org/apache/flex/core/ValuesManager.js      |    2 +-
 .../js/FlexJS/src/org/apache/flex/core/ViewBase.js |    6 +-
 .../src/org/apache/flex/createjs/Application.js    |   21 ++--
 .../src/org/apache/flex/createjs/core/UIBase.js    |    4 +-
 .../src/org/apache/flex/createjs/core/ViewBase.js  |   19 ++--
 .../flex/createjs/staticControls/CheckBox.js       |  113 +++++++++------
 .../apache/flex/createjs/staticControls/Label.js   |   25 ++--
 .../flex/createjs/staticControls/TextButton.js     |   56 +++++---
 .../src/org/apache/flex/events/CustomEvent.js      |    4 +-
 .../apache/flex/html/staticControls/RadioButton.js |   41 +++---
 .../flex/net/dataConverters/LazyCollection.js      |   14 +-
 .../org/apache/flex/utils/MXMLDataInterpreter.js   |    4 +-
 .../js/FlexJS/src/org/apache/flex/utils/Timer.js   |    2 +-
 .../flex/utils/ViewSourceContextMenuOption.js      |    3 +-
 20 files changed, 222 insertions(+), 175 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/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 ab86b93..980e161 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
@@ -24,7 +24,7 @@ org.apache.flex.binding.BindingBase = function() {
    * @private
    * @type {Object}
    */
-  this.document_;
+  this.document_ = null;
 };
 
 
@@ -64,10 +64,9 @@ org.apache.flex.binding.BindingBase.prototype.set_strand = function(value) {
   this.destination = value;
 
   try {
-      this.source = this.document_['get_' + this.sourceID]();
-  } 
-  catch(e) {
-      this.source = this.document_[this.sourceID];
+    this.source = this.document_['get_' + this.sourceID]();
+  } catch (e) {
+    this.source = this.document_[this.sourceID];
   }
 };
 
@@ -75,9 +74,7 @@ org.apache.flex.binding.BindingBase.prototype.set_strand = function(value) {
 /**
  * @this {org.apache.flex.binding.BindingBase}
  * @param {Object} document The MXML object.
- * @param {string} id The id for the instance.
  */
-org.apache.flex.binding.BindingBase.prototype.setDocument =
-    function(document, id) {
+org.apache.flex.binding.BindingBase.prototype.setDocument = function(document) {
   this.document_ = document;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
index ca2c4e9..fa83a4a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
@@ -37,5 +37,6 @@ org.apache.flex.binding.ConstantBinding.prototype.set_strand = function(value) {
   goog.base(this, 'set_strand', value);
 
   this.destination['set_' + this.destinationPropertyName](
-      this.source['get_' + this.sourcePropertyName]());
+    this.source['get_' + this.sourcePropertyName]()
+  );
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/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 ab168e6..8bb3ed6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
@@ -47,7 +47,7 @@ org.apache.flex.binding.SimpleBinding.prototype.sourceID = '';
  */
 org.apache.flex.binding.SimpleBinding.prototype.changeHandler = function() {
   this.destination['set_' + this.destinationPropertyName](
-      this.source['get_' + this.sourcePropertyName]()
+    this.source['get_' + this.sourcePropertyName]()
   );
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/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 ec52dbc..a16bd18 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -55,8 +55,8 @@ org.apache.flex.core.HTMLElementWrapper.prototype.addBead = function(bead) {
 
   this.strand.push(bead);
 
-  if (typeof bead.constructor.$implements !== 'undefined' &&
-      typeof bead.constructor.$implements.IBeadModel !== 'undefined') {
+  if (bead.constructor.$implements !== undefined &&
+      bead.constructor.$implements.IBeadModel !== undefined) {
     this.model = bead;
   }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js
index 810944f..5a2fd27 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js
@@ -29,7 +29,7 @@ org.apache.flex.core.ListBase = function() {
    * @protected
    * @type {Array.<Object>}
    */
-  this.dataProvider_;
+  this.dataProvider = null;
 
   /**
    * @private
@@ -64,7 +64,7 @@ org.apache.flex.core.ListBase.prototype.addToParent = function(p) {
  */
 org.apache.flex.core.ListBase.prototype.get_dataProvider =
     function() {
-  return this.dataProvider_;
+  return this.dataProvider;
 };
 
 
@@ -77,7 +77,7 @@ org.apache.flex.core.ListBase.prototype.set_dataProvider =
     function(value) {
   var dp, i, n, opt;
 
-  this.dataProvider_ = value;
+  this.dataProvider = value;
 
   dp = this.element.options;
   n = dp.length;
@@ -101,11 +101,15 @@ org.apache.flex.core.ListBase.prototype.set_dataProvider =
  */
 org.apache.flex.core.ListBase.prototype.get_selectedIndex =
     function() {
-  if (typeof this.element.selectedIndex !== 'undefined') {
-    return this.element.selectedIndex;
+  var result;
+
+  if (this.element.selectedIndex !== undefined) {
+    result = this.element.selectedIndex;
   } else {
-    return this.selectedIndex_;
+    result = this.selectedIndex_;
   }
+
+  return result;
 };
 
 
@@ -135,12 +139,12 @@ org.apache.flex.core.ListBase.prototype.get_selectedItem =
 
   si = this.get_selectedIndex();
 
-  if (!this.dataProvider_ || si < 0 ||
-      si >= this.dataProvider_.length) {
+  if (!this.dataProvider || si < 0 ||
+      si >= this.dataProvider.length) {
     return null;
   }
 
-  return this.dataProvider_[si];
+  return this.dataProvider[si];
 };
 
 
@@ -153,7 +157,7 @@ org.apache.flex.core.ListBase.prototype.set_selectedItem =
     function(value) {
   var dp, i, n;
 
-  dp = this.dataProvider_;
+  dp = this.dataProvider;
   n = dp.length;
   for (i = 0; i < n; i++) {
     if (dp[i] === value) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/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 5caa784..b4f9f1b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -29,13 +29,13 @@ org.apache.flex.core.UIBase = function() {
    * @private
    * @type {string}
    */
-  this.lastDisplay;
+  this.lastDisplay_ = null;
 
   /**
    * @protected
    * @type {Object}
    */
-  this.positioner;
+  this.positioner = null;
 };
 goog.inherits(org.apache.flex.core.UIBase,
     org.apache.flex.core.HTMLElementWrapper);
@@ -98,7 +98,7 @@ org.apache.flex.core.UIBase.prototype.set_height = function(pixels) {
  * @expose
  * @type {string}
  */
-org.apache.flex.core.UIBase.prototype.id;
+org.apache.flex.core.UIBase.prototype.id = null;
 
 
 /**
@@ -129,7 +129,7 @@ org.apache.flex.core.UIBase.prototype.set_id = function(value) {
  * @expose
  * @type {string}
  */
-org.apache.flex.core.UIBase.prototype.className;
+org.apache.flex.core.UIBase.prototype.className = null;
 
 /**
  * @expose
@@ -147,7 +147,7 @@ org.apache.flex.core.UIBase.prototype.get_className = function() {
  * @param {object} value The new className.
  */
 org.apache.flex.core.UIBase.prototype.set_className = function(value) {
-    if (this.className != value)
+    if (this.className !== value)
     {
         this.element.className = value;
         this.className = value;
@@ -160,7 +160,7 @@ org.apache.flex.core.UIBase.prototype.set_className = function(value) {
  * @expose
  * @type {object}
  */
-org.apache.flex.core.UIBase.prototype.model;
+org.apache.flex.core.UIBase.prototype.model = null;
 
 
 /**
@@ -191,7 +191,7 @@ org.apache.flex.core.UIBase.prototype.set_model = function(value) {
  * @return {object} True if visible.
  */
 org.apache.flex.core.UIBase.prototype.get_visible = function() {
-    return this.element.style.display != 'none';
+    return this.element.style.display !== 'none';
 };
 
 /**
@@ -200,21 +200,18 @@ org.apache.flex.core.UIBase.prototype.get_visible = function() {
  * @param {object} value The new model.
  */
 org.apache.flex.core.UIBase.prototype.set_visible = function(value) {
-    var oldValue = this.element.style.display != 'none';
-    if (value != oldValue)
-    {
-        if (!value)
-        {
-            this.lastDisplay = this.element.style.display;
+    var oldValue = this.element.style.display !== 'none';
+    if (value !== oldValue) {
+        if (!value) {
+            this.lastDisplay_ = this.element.style.display;
             this.element.style.display = 'none';
             this.dispatchEvent(new org.apache.flex.events.Event('hide'));
-        }
-        else
-        {
-            if (this.lastDisplay)
-                this.element.style.display = this.lastDisplay;
-            else
-                this.element.style.display = 'block';
+        } else {
+            if (this.lastDisplay_) {
+              this.element.style.display = this.lastDisplay_;
+            } else {
+              this.element.style.display = 'block';
+            }
             this.dispatchEvent(new org.apache.flex.events.Event('show'));
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
index 754d210..d299220 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
@@ -27,4 +27,4 @@ org.apache.flex.core.ValuesManager = function() {
  * @expose
  * @type {org.apache.flex.core.ValuesManager}
  */
-org.apache.flex.core.ValuesManager.prototype.valuesImpl;
+org.apache.flex.core.ValuesManager.prototype.valuesImpl = null;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/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 087b381..82e3137 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -33,21 +33,21 @@ goog.inherits(org.apache.flex.core.ViewBase, org.apache.flex.core.UIBase);
  * @expose
  * @type {Object}
  */
-org.apache.flex.core.ViewBase.prototype.applicationModel;
+org.apache.flex.core.ViewBase.prototype.applicationModel = null;
 
 
 /**
  * @expose
  * @type {Array}
  */
-org.apache.flex.core.ViewBase.prototype.MXMLProperties;
+org.apache.flex.core.ViewBase.prototype.MXMLProperties = null;
 
 
 /**
  * @expose
  * @type {Array}
  */
-org.apache.flex.core.ViewBase.prototype.MXMLDescriptor;
+org.apache.flex.core.ViewBase.prototype.MXMLDescriptor = null;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js
index bca24ff..60c9ffe 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/Application.js
@@ -25,7 +25,7 @@
 // ------------------------------------------------------------------
 // end createjs
 // ------------------------------------------------------------------
- 
+
 goog.provide('org.apache.flex.createjs.Application');
 
 //goog.require('org.apache.flex.core.HTMLElementWrapper');
@@ -87,7 +87,8 @@ org.apache.flex.createjs.Application.prototype.valuesImpl = null;
  * @param {string} t The event type.
  * @param {function(?): ?} fn The event handler.
  */
-org.apache.flex.createjs.Application.prototype.addEventListener = function(t, fn) {
+org.apache.flex.createjs.Application.prototype.addEventListener =
+  function(t, fn) {
     if (!this.element) {
         if (!this.queuedListeners_) {
             this.queuedListeners_ = [];
@@ -107,19 +108,19 @@ org.apache.flex.createjs.Application.prototype.addEventListener = function(t, fn
  */
 org.apache.flex.createjs.Application.prototype.start = function() {
     var evt, i, n, q;
-    
+
     // For createjs, the application is the same as the canvas
     // and it provides convenient access to the stage.
-    
-	this.element = document.createElement('canvas');
-	this.element.id = 'flexjsCanvas';
-	this.element.width = 700;
-	this.element.height = 500;
+
+    this.element = document.createElement('canvas');
+    this.element.id = 'flexjsCanvas';
+    this.element.width = 700;
+    this.element.height = 500;
 
     var body = document.getElementsByTagName('body')[0];
     body.appendChild(this.element);
-   
-    this.stage = new createjs.Stage("flexjsCanvas");
+
+    this.stage = new createjs.Stage('flexjsCanvas');
 
     if (this.queuedListeners_) {
         n = this.queuedListeners_.length;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
index 7c01923..2f7f806 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/UIBase.js
@@ -39,10 +39,10 @@ goog.inherits(org.apache.flex.createjs.core.UIBase,
  * @param {Object} p The parent element.
  */
 org.apache.flex.createjs.core.UIBase.prototype.addToParent = function(p) {
-    
+
     this.element = new createjs.Container();
     p.addChild(this.element);
-    
+
     this.positioner = this.element;
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js
index b3dcd7a..a60fc89 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/core/ViewBase.js
@@ -33,25 +33,26 @@ org.apache.flex.createjs.core.ViewBase = function() {
       */
       this.currentObject_;
 };
-goog.inherits(org.apache.flex.createjs.core.ViewBase, org.apache.flex.createjs.core.UIBase);
+goog.inherits(org.apache.flex.createjs.core.ViewBase,
+  org.apache.flex.createjs.core.UIBase);
 
 /**
  * @expose
- * @type {Object}
+ * @return {Object} Returns the application model.
  */
-org.apache.flex.createjs.core.ViewBase.prototype.get_applicationModel = function()
-{
+org.apache.flex.createjs.core.ViewBase.prototype.get_applicationModel =
+  function() {
   return this.applicationModel;
-}
+};
 
 /**
  * @expose
- * @type {Object}
+ * @param {Object} value The application model.
  */
-org.apache.flex.createjs.core.ViewBase.prototype.set_applicationModel = function(value)
-{
+org.apache.flex.createjs.core.ViewBase.prototype.set_applicationModel =
+  function(value) {
   this.applicationModel = value;
-}
+};
 
 /**
  * @expose

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/CheckBox.js
index 5a2ae5c..d2173a8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/CheckBox.js
@@ -16,19 +16,35 @@ goog.provide('org.apache.flex.createjs.staticControls.CheckBox');
 
 goog.require('org.apache.flex.createjs.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.createjs.core.UIBase}
  */
 org.apache.flex.createjs.staticControls.CheckBox = function() {
-    org.apache.flex.createjs.core.UIBase.call(this);
+    goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.createjs.staticControls.CheckBox, org.apache.flex.createjs.core.UIBase
-);
+goog.inherits(org.apache.flex.createjs.staticControls.CheckBox,
+  org.apache.flex.createjs.core.UIBase);
 
+/**
+ * @expose
+ * @type {Object}
+ */
 org.apache.flex.createjs.staticControls.CheckBox.prototype.checkMark = null;
-org.apache.flex.createjs.staticControls.CheckBox.prototype.checkMarkBackground = null;
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.createjs.staticControls.CheckBox.prototype.checkMarkBackground =
+  null;
+
+/**
+ * @expose
+ * @type {Object}
+ */
 org.apache.flex.createjs.staticControls.CheckBox.prototype.checkBoxLabel = null;
 
 /**
@@ -36,37 +52,40 @@ org.apache.flex.createjs.staticControls.CheckBox.prototype.checkBoxLabel = null;
  * @this {org.apache.flex.createjs.staticControls.CheckBox}
  * @param {Object} p The parent element.
  */
-org.apache.flex.createjs.staticControls.CheckBox.prototype.addToParent = function(p)
-{	
-	this.checkMarkBackground = new createjs.Shape();
-	this.checkMarkBackground.name = "checkmarkbackground";
-	this.checkMarkBackground.graphics.beginFill("red").drawRoundRect(0, 0, 40, 40, 8);
-	//this.checkMarkBackground.graphics.setStrokeStyle( 0 ).beginStroke( '#000' ).drawRect( 0, 0, this.width, this.height);
-	//var hit = new createjs.Shape();
-	//hit.graphics.beginFill("#000").drawRect(0, 0, this.width, this.height);
-	//this.checkMarkBackground.hitArea = hit;
-
-	this.checkMark = new createjs.Shape();
-	this.checkMark.name = "checkmark";
-	this.checkMark.graphics.beginFill("white").drawRoundRect(0, 0, 32, 32, 6);
-	this.checkMark.x = 4;
-	this.checkMark.y = 4;
-	this.checkMark.visible = this.selected;
-		
-	this.checkBoxLabel = new createjs.Text("checkbox", "20px Arial", "#ff7700");
-	this.checkBoxLabel.name = "label";
-	this.checkBoxLabel.textAlign = "left";
-	this.checkBoxLabel.textBaseline = "middle";
-	this.checkBoxLabel.x = 45;
-	this.checkBoxLabel.y = 40/2;
-
-	this.element = new createjs.Container();
-	this.element.name = "checkbox";
-	this.element.addChild(this.checkMarkBackground, this.checkBoxLabel, this.checkMark);
-	// use bind(this) to avoid loose scope
-	this.element.onClick = this.clickHandler.bind(this);
-
-	p.addChild(this.element);
+org.apache.flex.createjs.staticControls.CheckBox.prototype.addToParent =
+  function(p) {
+    this.checkMarkBackground = new createjs.Shape();
+    this.checkMarkBackground.name = 'checkmarkbackground';
+    this.checkMarkBackground.graphics.beginFill('red').
+      drawRoundRect(0, 0, 40, 40, 8);
+    //this.checkMarkBackground.graphics.setStrokeStyle( 0 ).beginStroke('#000').
+    //  drawRect( 0, 0, this.width, this.height);
+    //var hit = new createjs.Shape();
+    //hit.graphics.beginFill("#000").drawRect(0, 0, this.width, this.height);
+    //this.checkMarkBackground.hitArea = hit;
+
+    this.checkMark = new createjs.Shape();
+    this.checkMark.name = 'checkmark';
+    this.checkMark.graphics.beginFill('white').drawRoundRect(0, 0, 32, 32, 6);
+    this.checkMark.x = 4;
+    this.checkMark.y = 4;
+    this.checkMark.visible = this.selected;
+
+    this.checkBoxLabel = new createjs.Text('checkbox', '20px Arial', '#ff7700');
+    this.checkBoxLabel.name = 'label';
+    this.checkBoxLabel.textAlign = 'left';
+    this.checkBoxLabel.textBaseline = 'middle';
+    this.checkBoxLabel.x = 45;
+    this.checkBoxLabel.y = 40 / 2;
+
+    this.element = new createjs.Container();
+    this.element.name = 'checkbox';
+    this.element.addChild(this.checkMarkBackground, this.checkBoxLabel,
+      this.checkMark);
+    // use bind(this) to avoid loose scope
+    this.element.onClick = this.clickHandler.bind(this);
+
+    p.addChild(this.element);
 
     this.positioner = this.element;
 };
@@ -76,7 +95,8 @@ org.apache.flex.createjs.staticControls.CheckBox.prototype.addToParent = functio
  * @this {org.apache.flex.createjs.staticControls.CheckBox}
  * @return {string} The text getter.
  */
-org.apache.flex.createjs.staticControls.CheckBox.prototype.get_text = function() {
+org.apache.flex.createjs.staticControls.CheckBox.prototype.get_text =
+  function() {
     return this.checkBoxLabel.text;
 };
 
@@ -85,7 +105,8 @@ org.apache.flex.createjs.staticControls.CheckBox.prototype.get_text = function()
  * @this {org.apache.flex.createjs.staticControls.CheckBox}
  * @param {string} value The text setter.
  */
-org.apache.flex.createjs.staticControls.CheckBox.prototype.set_text = function(value) {
+org.apache.flex.createjs.staticControls.CheckBox.prototype.set_text =
+  function(value) {
     this.checkBoxLabel.text = value;
 };
 
@@ -94,7 +115,8 @@ org.apache.flex.createjs.staticControls.CheckBox.prototype.set_text = function(v
  * @this {org.apache.flex.createjs.staticControls.CheckBox}
  * @return {bool} The selected getter.
  */
-org.apache.flex.createjs.staticControls.CheckBox.prototype.get_selected = function() {
+org.apache.flex.createjs.staticControls.CheckBox.prototype.get_selected =
+  function() {
     return this.selected;
 };
 
@@ -103,15 +125,18 @@ org.apache.flex.createjs.staticControls.CheckBox.prototype.get_selected = functi
  * @this {org.apache.flex.createjs.staticControls.CheckBox}
  * @param {bool} value The selected setter.
  */
-org.apache.flex.createjs.staticControls.CheckBox.prototype.set_selected = function(value) {
-	this.checkMark.visible = this.selected = value;
-	this.element.getStage().update();
+org.apache.flex.createjs.staticControls.CheckBox.prototype.set_selected =
+  function(value) {
+    this.checkMark.visible = this.selected = value;
+    this.element.getStage().update();
 };
 
 /**
  * @expose
  * @this {org.apache.flex.createjs.staticControls.CheckBox}
+ * @param {string|Object|goog.events.Event} event The event.
  */
-org.apache.flex.createjs.staticControls.CheckBox.prototype.clickHandler = function(event) {
-	this.set_selected(!this.get_selected());
+org.apache.flex.createjs.staticControls.CheckBox.prototype.clickHandler =
+  function(event) {
+    this.set_selected(!this.get_selected());
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/Label.js
index 8663426..1821f0c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/Label.js
@@ -23,24 +23,24 @@ goog.require('org.apache.flex.createjs.core.UIBase');
 org.apache.flex.createjs.staticControls.Label = function() {
     org.apache.flex.createjs.core.UIBase.call(this);
 };
-goog.inherits(
-    org.apache.flex.createjs.staticControls.Label, org.apache.flex.createjs.core.UIBase
-);
+goog.inherits(org.apache.flex.createjs.staticControls.Label,
+  org.apache.flex.createjs.core.UIBase);
 
 /**
  * @override
  * @this {org.apache.flex.createjs.staticControls.Label}
  * @param {Object} p The parent element.
  */
-org.apache.flex.createjs.staticControls.Label.prototype.addToParent = function(p) {
+org.apache.flex.createjs.staticControls.Label.prototype.addToParent =
+  function(p) {
     goog.base(this, 'addToParent', p);
-    
-    this.element = new createjs.Text("default text", "20px Arial", "#ff7700");
- 	this.element.x = 0;
- 	this.element.y = 20;
- 	this.element.textBaseline = "alphabetic";
- 	p.addChild(this.element);
- 	p.getStage().update();
+
+    this.element = new createjs.Text('default text', '20px Arial', '#ff7700');
+     this.element.x = 0;
+     this.element.y = 20;
+     this.element.textBaseline = 'alphabetic';
+     p.addChild(this.element);
+     p.getStage().update();
 
     this.positioner = this.element;
 };
@@ -59,7 +59,8 @@ org.apache.flex.createjs.staticControls.Label.prototype.get_text = function() {
  * @this {org.apache.flex.createjs.staticControls.Label}
  * @param {string} value The text setter.
  */
-org.apache.flex.createjs.staticControls.Label.prototype.set_text = function(value) {
+org.apache.flex.createjs.staticControls.Label.prototype.set_text =
+  function(value) {
     this.element.text = value;
     this.element.getStage().update();
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
index 41de47d..d781940 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/createjs/staticControls/TextButton.js
@@ -23,12 +23,21 @@ goog.require('org.apache.flex.createjs.core.UIBase');
 org.apache.flex.createjs.staticControls.TextButton = function() {
     org.apache.flex.createjs.core.UIBase.call(this);
 };
-goog.inherits(
-    org.apache.flex.createjs.staticControls.TextButton, org.apache.flex.createjs.core.UIBase
-);
+goog.inherits(org.apache.flex.createjs.staticControls.TextButton,
+  org.apache.flex.createjs.core.UIBase);
 
+/**
+ * @expose
+ * @type {Object}
+ */
 org.apache.flex.createjs.staticControls.TextButton.prototype.buttonLabel = null;
-org.apache.flex.createjs.staticControls.TextButton.prototype.buttonBackground = null;
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.createjs.staticControls.TextButton.prototype.buttonBackground =
+  null;
 
 /**
  * @override
@@ -37,24 +46,26 @@ org.apache.flex.createjs.staticControls.TextButton.prototype.buttonBackground =
  */
 org.apache.flex.createjs.staticControls.TextButton.prototype.addToParent =
     function(p) {
-    
+
     this.buttonBackground = new createjs.Shape();
-	this.buttonBackground.name = "background";
-	this.buttonBackground.graphics.beginFill("red").drawRoundRect(0, 0, 200, 60, 10);
-	
-	this.buttonLabel = new createjs.Text("button", "bold 24px Arial", "#FFFFFF");
-	this.buttonLabel.name = "label";
-	this.buttonLabel.textAlign = "center";
-	this.buttonLabel.textBaseline = "middle";
-	this.buttonLabel.x = 200/2;
-	this.buttonLabel.y = 60/2;
-	
-	this.element = new createjs.Container();
-	this.element.name = "button";
-	this.element.x = 50;
-	this.element.y = 25;
-	this.element.addChild(this.buttonBackground, this.buttonLabel);
-	p.addChild(this.element);
+    this.buttonBackground.name = 'background';
+    this.buttonBackground.graphics.beginFill('red').
+      drawRoundRect(0, 0, 200, 60, 10);
+
+    this.buttonLabel = new createjs.Text('button', 'bold 24px Arial',
+      '#FFFFFF');
+    this.buttonLabel.name = 'label';
+    this.buttonLabel.textAlign = 'center';
+    this.buttonLabel.textBaseline = 'middle';
+    this.buttonLabel.x = 200 / 2;
+    this.buttonLabel.y = 60 / 2;
+
+    this.element = new createjs.Container();
+    this.element.name = 'button';
+    this.element.x = 50;
+    this.element.y = 25;
+    this.element.addChild(this.buttonBackground, this.buttonLabel);
+    p.addChild(this.element);
 
     this.positioner = this.element;
 };
@@ -64,7 +75,8 @@ org.apache.flex.createjs.staticControls.TextButton.prototype.addToParent =
  * @this {org.apache.flex.createjs.staticControls.TextButton}
  * @return {string} The text getter.
  */
-org.apache.flex.createjs.staticControls.TextButton.prototype.get_text = function() {
+org.apache.flex.createjs.staticControls.TextButton.prototype.get_text =
+  function() {
     return this.buttonLabel.text;
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
index b1a05ef..4395395 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
@@ -25,7 +25,7 @@ goog.require('goog.events.Event');
  */
 org.apache.flex.events.CustomEvent = function(type) {
   goog.base(this);
-  
+
   this.type = type;
 };
 goog.inherits(org.apache.flex.events.CustomEvent,
@@ -46,4 +46,4 @@ org.apache.flex.events.CustomEvent.prototype.init = function(type) {
  * @expose
  * @type {string} type The event type.
  */
-org.apache.flex.events.CustomEvent.prototype.type;
+org.apache.flex.events.CustomEvent.prototype.type = null;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
index ece05d2..9cad80f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
@@ -121,7 +121,8 @@ org.apache.flex.html.staticControls.RadioButton.prototype.set_selected =
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @return {Object} The value getter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.get_value = function() {
+org.apache.flex.html.staticControls.RadioButton.prototype.get_value =
+  function() {
     return this.element.childNodes.item(0).value;
 };
 
@@ -130,7 +131,8 @@ org.apache.flex.html.staticControls.RadioButton.prototype.get_value = function()
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @param {Object} value The value setter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.set_value = function(value) {
+org.apache.flex.html.staticControls.RadioButton.prototype.set_value =
+  function(value) {
     this.element.childNodes.item(0).value = value;
 };
 
@@ -139,14 +141,18 @@ org.apache.flex.html.staticControls.RadioButton.prototype.set_value = function(v
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @return {Object} The value of the selected RadioButton.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.get_selectedValue = function() {
-    var groupName = this.element.childNodes.item(0).name;
-    var buttons = document.getElementsByName(groupName);
-    var n = buttons.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (buttons[i].checked)
+org.apache.flex.html.staticControls.RadioButton.prototype.get_selectedValue =
+  function() {
+    var buttons, groupName, i, n;
+
+    groupName = this.element.childNodes.item(0).name;
+    buttons = document.getElementsByName(groupName);
+    n = buttons.length;
+
+    for (i = 0; i < n; i++) {
+        if (buttons[i].checked) {
             return buttons[i].value;
+        }
     }
     return null;
 };
@@ -156,14 +162,15 @@ org.apache.flex.html.staticControls.RadioButton.prototype.get_selectedValue = fu
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @param {Object} value The value of the selected RadioButton.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.set_selectedValue = function(value) {
-    var groupName = this.element.childNodes.item(0).name;
-    var buttons = document.getElementsByName(groupName);
-    var n = buttons.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (buttons[i].value == value)
-        {
+org.apache.flex.html.staticControls.RadioButton.prototype.set_selectedValue =
+  function(value) {
+    var buttons, groupName, i, n;
+
+    groupName = this.element.childNodes.item(0).name;
+    buttons = document.getElementsByName(groupName);
+    n = buttons.length;
+    for (i = 0; i < n; i++) {
+        if (buttons[i].value === value) {
             buttons[i].checked = true;
             break;
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/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 5b85b56..3a8cd4d 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
@@ -24,32 +24,32 @@ org.apache.flex.net.dataConverters.LazyCollection = function() {
    * @private
    * @type {Object}
    */
-  this.data_;
+  this.data_ = null;
 
   /**
    * @private
    * @type {Object}
    */
 
-  this.itemConverter_;
+  this.itemConverter_ = null;
 
   /**
    * @private
    * @type {Object}
    */
-  this.inputParser_;
+  this.inputParser_ = null;
 
   /**
    * @private
    * @type {Object}
    */
-  this.rawData_;
+  this.rawData_ = null;
 
   /**
    * @private
    * @type {Object}
    */
-  this.strand_;
+  this.strand_ = null;
 };
 
 
@@ -101,7 +101,7 @@ org.apache.flex.net.dataConverters.LazyCollection.prototype.set_itemConverter =
  * @expose
  * @type {string}
  */
-org.apache.flex.net.dataConverters.LazyCollection.prototype.id;
+org.apache.flex.net.dataConverters.LazyCollection.prototype.id = null;
 
 
 /**
@@ -164,7 +164,7 @@ org.apache.flex.net.dataConverters.LazyCollection.prototype.completeHandler =
  */
 org.apache.flex.net.dataConverters.LazyCollection.prototype.getItemAt =
     function(index) {
-  if (typeof this.data_[index] === 'undefined') {
+  if (this.data_[index] === undefined) {
     this.data_[index] =
         this.itemConverter_.convertItem(this.rawData_[index]);
   }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/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 8715c19..4dc476d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
@@ -94,7 +94,7 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
   var bead, beadOffset, beads, children, Cls, comp, comps, generateMXMLArray,
       generateMXMLObject, i, id, j, k, l, m, n, name, self, simple, value;
 
-  if (typeof opt_recursive === 'undefined') {
+  if (opt_recursive === undefined) {
     opt_recursive = true;
   }
 
@@ -142,7 +142,7 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
           typeof comp.get_strand === 'function') {
         comp.addBead(value);
       }
-      //*/
+      */
     }
 
     if (typeof(comp.initModel) === 'function') {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
index 49a8d4e..ad4968e 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Timer.js
@@ -27,7 +27,7 @@ goog.require('org.apache.flex.events.EventDispatcher');
 org.apache.flex.utils.Timer = function(delay, opt_repeatCount) {
   goog.base(this);
 
-  if (typeof opt_repeatCount !== 'undefined') {
+  if (opt_repeatCount !== undefined) {
     this._repeatCount = opt_repeatCount;
   }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/96fe140e/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js
index 53820b2..05195f6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/ViewSourceContextMenuOption.js
@@ -26,6 +26,7 @@ org.apache.flex.utils.ViewSourceContextMenuOption = function() {
  * @this {org.apache.flex.utils.ViewSourceContextMenuOption}
  * @param {object} value The strand (owner) of the bead.
  */
-org.apache.flex.utils.ViewSourceContextMenuOption.prototype.set_strand = function(value) {
+org.apache.flex.utils.ViewSourceContextMenuOption.prototype.set_strand =
+  function(value) {
 };
 


[7/9] git commit: [flex-asjs] [refs/heads/develop] - Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop

Posted by er...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>

Conflicts:
	frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js


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

Branch: refs/heads/develop
Commit: f3ce06eb7509906ee35408534e6df912000b32f3
Parents: 34b0f27 9de125f
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Sat May 4 07:51:27 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Sat May 4 07:51:27 2013 +0200

----------------------------------------------------------------------
 .../src/org/apache/flex/createjs/core/ViewBase.js  |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
----------------------------------------------------------------------



[3/9] git commit: [flex-asjs] [refs/heads/develop] - [FlexJS] initial commit of 'goog.events' refactoring

Posted by er...@apache.org.
[FlexJS] initial commit of 'goog.events' refactoring

Major refactor that exchanges the 'roll-your-own' event handling for 'goog.events'.

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: b7b74f506b5462a3afa6f96509b73613c550f214
Parents: ab3a320
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Wed Apr 24 20:19:35 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Wed Apr 24 20:35:59 2013 +0200

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/FlexGlobal.js    |   61 --
 .../js/FlexJS/src/org/apache/flex/FlexObject.js    |   26 -
 .../src/org/apache/flex/binding/BindingBase.js     |   78 ++
 .../src/org/apache/flex/binding/ConstantBinding.js |   59 +-
 .../src/org/apache/flex/binding/SimpleBinding.js   |   72 +--
 .../FlexJS/src/org/apache/flex/core/Application.js |   66 +--
 .../src/org/apache/flex/core/HTMLElementWrapper.js |  174 ++--
 .../FlexJS/src/org/apache/flex/core/IDocument.js   |   28 -
 .../js/FlexJS/src/org/apache/flex/core/ListBase.js |  185 ++++
 .../org/apache/flex/core/SimpleCSSValuesImpl.js    |    7 +-
 .../src/org/apache/flex/core/SimpleValuesImpl.js   |    7 +-
 .../js/FlexJS/src/org/apache/flex/core/UIBase.js   |   74 +-
 .../src/org/apache/flex/core/ValuesManager.js      |    8 +-
 .../js/FlexJS/src/org/apache/flex/core/ViewBase.js |   29 +-
 .../src/org/apache/flex/events/CustomEvent.js      |   19 +-
 .../js/FlexJS/src/org/apache/flex/events/Event.js  |   22 +-
 .../src/org/apache/flex/events/EventDispatcher.js  |  100 +--
 .../apache/flex/html/staticControls/CheckBox.js    |   55 +-
 .../apache/flex/html/staticControls/ComboBox.js    |  307 +++----
 .../flex/html/staticControls/DropDownList.js       |  129 +---
 .../org/apache/flex/html/staticControls/Label.js   |   20 +-
 .../org/apache/flex/html/staticControls/List.js    |  124 +---
 .../apache/flex/html/staticControls/RadioButton.js |   66 +-
 .../apache/flex/html/staticControls/TextArea.js    |   27 +-
 .../apache/flex/html/staticControls/TextButton.js  |   24 +-
 .../apache/flex/html/staticControls/TextInput.js   |   29 +-
 .../apache/flex/html5/staticControls/CheckBox.js   |   55 +-
 .../apache/flex/html5/staticControls/ComboBox.js   |  306 +++----
 .../flex/html5/staticControls/DropDownList.js      |  129 +---
 .../org/apache/flex/html5/staticControls/Label.js  |   23 +-
 .../org/apache/flex/html5/staticControls/List.js   |  121 +---
 .../flex/html5/staticControls/RadioButton.js       |   66 +-
 .../apache/flex/html5/staticControls/TextArea.js   |   27 +-
 .../apache/flex/html5/staticControls/TextButton.js |   27 +-
 .../apache/flex/html5/staticControls/TextInput.js  |   29 +-
 .../src/org/apache/flex/jquery/Application.js      |   96 +--
 .../apache/flex/jquery/staticControls/CheckBox.js  |   72 +-
 .../flex/jquery/staticControls/RadioButton.js      |   68 +-
 .../flex/jquery/staticControls/TextButton.js       |   29 +-
 .../FlexJS/src/org/apache/flex/net/HTTPHeader.js   |   26 +-
 .../FlexJS/src/org/apache/flex/net/HTTPService.js  |  451 +++++------
 .../src/org/apache/flex/net/JSONInputParser.js     |    8 +-
 .../src/org/apache/flex/net/JSONItemConverter.js   |    9 +-
 .../flex/net/dataConverters/LazyCollection.js      |  159 ++--
 .../FlexJS/src/org/apache/flex/utils/IE8Utils.js   |  104 ---
 .../org/apache/flex/utils/MXMLDataInterpreter.js   |  675 ++++++++-------
 .../js/FlexJS/src/org/apache/flex/utils/Timer.js   |  126 ++--
 47 files changed, 1901 insertions(+), 2501 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/FlexGlobal.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/FlexGlobal.js b/frameworks/js/FlexJS/src/org/apache/flex/FlexGlobal.js
deleted file mode 100644
index 01f06bf..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/FlexGlobal.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-goog.provide('org.apache.flex.FlexGlobal');
-
-goog.require('org.apache.flex.events.Event');
-goog.require('org.apache.flex.events.CustomEvent');
-
-/**
- * @constructor
- */
-org.apache.flex.FlexGlobal = function() {};
-
-/**
- * @param {Object} context The context.
- * @param {?} method The method.
- * @return {function (?): void} Return new proxy.
- */
-org.apache.flex.FlexGlobal.createProxy = function(context, method) {
-    return function(value) {
-        method.apply(context, [value]);
-    };
-};
-
-/**
- * @param {?} ctor The creator.
- * @param {Array} ctorArgs The creator arguments.
- * @return {Object} Return the new object.
- */
-org.apache.flex.FlexGlobal.newObject = function(ctor, ctorArgs) {
-    var evt;
-
-    if ((ctor === org.apache.flex.events.Event ||
-         ctor === org.apache.flex.events.CustomEvent) && 
-         ctorArgs.length === 1) {
-        evt = org.apache.flex.events.EventDispatcher.createEvent(ctorArgs[0]);
-        return evt;
-    }
-
-    if (ctorArgs.length === 1) {
-        return new ctor(ctorArgs[0]);
-    }
-
-    if (ctorArgs.length === 0) {
-        return new ctor();
-    }
-
-    return {};
-};
-

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/FlexObject.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/FlexObject.js b/frameworks/js/FlexJS/src/org/apache/flex/FlexObject.js
deleted file mode 100644
index a0521bf..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/FlexObject.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-goog.provide('org.apache.flex.FlexObject');
-
-/**
- * @constructor
- */
-org.apache.flex.FlexObject = function() {};
-
-/**
- * @protected
- * @type {Object}
- */
-org.apache.flex.FlexObject.prototype.element = null;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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
new file mode 100644
index 0000000..08032a6
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/BindingBase.js
@@ -0,0 +1,78 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('org.apache.flex.binding.BindingBase');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.binding.BindingBase = function() {
+  /**
+   * @private
+   * @type {Object}
+   */
+  this.document_;
+};
+
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.binding.BindingBase.prototype.destination = null;
+
+
+/**
+ * @expose
+ * @type {string}
+ */
+org.apache.flex.binding.BindingBase.prototype.destinationPropertyName = '';
+
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.binding.BindingBase.prototype.source = null;
+
+
+/**
+ * @expose
+ * @type {string}
+ */
+org.apache.flex.binding.BindingBase.prototype.sourcePropertyName = '';
+
+
+/**
+ * @this {org.apache.flex.binding.BindingBase}
+ * @param {Object} value The strand (owner) of the bead.
+ */
+org.apache.flex.binding.BindingBase.prototype.set_strand = function(value) {
+  this.destination = value;
+
+  this.source = this.document_[this.sourceID];
+};
+
+
+/**
+ * @this {org.apache.flex.binding.BindingBase}
+ * @param {Object} document The MXML object.
+ * @param {string} id The id for the instance.
+ */
+org.apache.flex.binding.BindingBase.prototype.setDocument =
+    function(document, id) {
+  this.document_ = document;
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js b/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
index 241337e..ca2c4e9 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
@@ -3,7 +3,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *    http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,63 +14,28 @@
 
 goog.provide('org.apache.flex.binding.ConstantBinding');
 
-goog.require('org.apache.flex.FlexGlobal');
-goog.require('org.apache.flex.FlexObject');
+goog.require('org.apache.flex.binding.BindingBase');
+
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.binding.ConstantBinding = function() {
-    org.apache.flex.FlexObject.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.binding.ConstantBinding, org.apache.flex.FlexObject
-);
-
-/**
- * @expose
- * @type {Object}
- */
-org.apache.flex.binding.ConstantBinding.prototype.destination = null;
-
-/**
- * @expose
- * @type {string}
- */
-org.apache.flex.binding.ConstantBinding.prototype.destinationPropertyName = '';
-
-/**
- * @expose
- * @type {Object}
- */
-org.apache.flex.binding.ConstantBinding.prototype.source = null;
+goog.inherits(org.apache.flex.binding.ConstantBinding,
+    org.apache.flex.binding.BindingBase);
 
-/**
- * @expose
- * @type {string}
- */
-org.apache.flex.binding.ConstantBinding.prototype.sourcePropertyName = '';
 
 /**
+ * @override
  * @this {org.apache.flex.binding.ConstantBinding}
- * @param {object} value The strand (owner) of the bead.
+ * @param {Object} value The strand (owner) of the bead.
  */
 org.apache.flex.binding.ConstantBinding.prototype.set_strand = function(value) {
-    this.destination = value;
-    this.source = this.document[this.sourceID];
+  goog.base(this, 'set_strand', value);
 
-    this.destination['set_' + this.destinationPropertyName](
-        this.source['get_' + this.sourcePropertyName]()
-    );
-};
-
-/**
- * @this {org.apache.flex.binding.ConstantBinding}
- * @param {object} document The MXML object.
- * @param {string} id The id for the instance.
- */
-org.apache.flex.binding.ConstantBinding.prototype.setDocument =
-                                                    function(document, id) {
-    this.document = document;
+  this.destination['set_' + this.destinationPropertyName](
+      this.source['get_' + this.sourcePropertyName]());
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 822b1ac..ab168e6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
@@ -14,38 +14,19 @@
 
 goog.provide('org.apache.flex.binding.SimpleBinding');
 
-goog.require('org.apache.flex.FlexGlobal');
-goog.require('org.apache.flex.FlexObject');
+goog.require('org.apache.flex.binding.BindingBase');
+
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.binding.SimpleBinding = function() {
-    org.apache.flex.FlexObject.call(this);
-    
-    /**
-     * @private
-     * @type {object}
-     */
-    this.document;
-
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.binding.SimpleBinding, org.apache.flex.FlexObject
-);
-
-/**
- * @expose
- * @type {Object}
- */
-org.apache.flex.binding.SimpleBinding.prototype.destination = null;
+goog.inherits(org.apache.flex.binding.SimpleBinding,
+    org.apache.flex.binding.BindingBase);
 
-/**
- * @expose
- * @type {string}
- */
-org.apache.flex.binding.SimpleBinding.prototype.destinationPropertyName = '';
 
 /**
  * @expose
@@ -53,11 +34,6 @@ org.apache.flex.binding.SimpleBinding.prototype.destinationPropertyName = '';
  */
 org.apache.flex.binding.SimpleBinding.prototype.eventName = '';
 
-/**
- * @expose
- * @type {Object}
- */
-org.apache.flex.binding.SimpleBinding.prototype.source = null;
 
 /**
  * @expose
@@ -65,43 +41,27 @@ org.apache.flex.binding.SimpleBinding.prototype.source = null;
  */
 org.apache.flex.binding.SimpleBinding.prototype.sourceID = '';
 
-/**
- * @expose
- * @type {string}
- */
-org.apache.flex.binding.SimpleBinding.prototype.sourcePropertyName = '';
 
 /**
  * @this {org.apache.flex.binding.SimpleBinding}
  */
 org.apache.flex.binding.SimpleBinding.prototype.changeHandler = function() {
-    this.destination['set_' + this.destinationPropertyName](
-        this.source['get_' + this.sourcePropertyName]()
-    );
+  this.destination['set_' + this.destinationPropertyName](
+      this.source['get_' + this.sourcePropertyName]()
+  );
 };
 
+
 /**
+ * @override
  * @this {org.apache.flex.binding.SimpleBinding}
- * @param {object} value The strand (owner) of the bead.
+ * @param {Object} value The strand (owner) of the bead.
  */
 org.apache.flex.binding.SimpleBinding.prototype.set_strand = function(value) {
-    this.destination = value;
-    this.source = this.document[this.sourceID];
-    this.source.addEventListener(
-        this.eventName, org.apache.flex.FlexGlobal.createProxy(
-            this, this.changeHandler
-        )
-    );
+  goog.base(this, 'set_strand', value);
 
-    this.changeHandler();
-};
+  this.source.addEventListener(this.eventName,
+      goog.bind(this.changeHandler, this));
 
-/**
- * @this {org.apache.flex.binding.SimpleBinding}
- * @param {object} document The MXML object.
- * @param {string} id The id for the instance.
- */
-org.apache.flex.binding.SimpleBinding.prototype.setDocument =
-                                                    function(document, id) {
-    this.document = document;
+  this.changeHandler();
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 84a7c72..b588ac7 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -15,102 +15,64 @@
 goog.provide('org.apache.flex.core.Application');
 
 goog.require('org.apache.flex.core.HTMLElementWrapper');
-
-goog.require('org.apache.flex.core.SimpleValuesImpl');
-goog.require('org.apache.flex.core.ValuesManager');
-goog.require('org.apache.flex.core.ViewBase');
 goog.require('org.apache.flex.utils.MXMLDataInterpreter');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.HTMLElementWrapper}
  */
 org.apache.flex.core.Application = function() {
-    org.apache.flex.core.HTMLElementWrapper.call(this);
-
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this.queuedListeners_;
-
+  goog.base(this);
 };
 goog.inherits(org.apache.flex.core.Application,
     org.apache.flex.core.HTMLElementWrapper);
 
+
 /**
  * @expose
  * @type {Object}
  */
 org.apache.flex.core.Application.prototype.controller = null;
 
+
 /**
  * @expose
  * @type {org.apache.flex.core.ViewBase}
  */
 org.apache.flex.core.Application.prototype.initialView = null;
 
+
 /**
  * @expose
  * @type {org.apache.flex.events.EventDispatcher}
  */
 org.apache.flex.core.Application.prototype.model = null;
 
+
 /**
  * @expose
  * @type {org.apache.flex.core.SimpleValuesImpl}
  */
 org.apache.flex.core.Application.prototype.valuesImpl = null;
 
-/**
- * @this {org.apache.flex.core.Application}
- * @param {string} t The event type.
- * @param {function(?): ?} fn The event handler.
- */
-org.apache.flex.core.Application.prototype.addEventListener = function(t, fn) {
-    if (!this.element) {
-        if (!this.queuedListeners_) {
-            this.queuedListeners_ = [];
-        }
-
-        this.queuedListeners_.push({ type: t, handler: fn });
-
-        return;
-    }
-
-    goog.base(this, 'addEventListener', t, fn);
-};
 
 /**
  * @expose
  * @this {org.apache.flex.core.Application}
  */
 org.apache.flex.core.Application.prototype.start = function() {
-    var evt, i, n, q;
-
-    this.element = document.getElementsByTagName('body')[0];
-
-    if (this.queuedListeners_) {
-        n = this.queuedListeners_.length;
-        for (i = 0; i < n; i++) {
-            q = this.queuedListeners_[i];
-
-            this.addEventListener(q.type, q.handler);
-        }
-    }
-
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
-            this.get_MXMLProperties());
+  this.element = document.getElementsByTagName('body')[0];
 
-    org.apache.flex.core.ValuesManager.valuesImpl = this.valuesImpl;
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
+      this.get_MXMLProperties());
 
-    evt = this.createEvent('initialize');
-    this.dispatchEvent(evt);
+  this.dispatchEvent('initialize');
 
-    this.initialView.addToParent(this.element);
-    this.initialView.initUI(this.model);
+  this.initialView.addToParent(this.element);
+  this.initialView.initUI(this.model);
 
-    evt = this.createEvent('viewChanged');
-    this.dispatchEvent(evt);
+  this.dispatchEvent('viewChanged');
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 ec837af..ec52dbc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -3,7 +3,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *    http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,139 +14,137 @@
 
 goog.provide('org.apache.flex.core.HTMLElementWrapper');
 
-goog.require('org.apache.flex.FlexObject');
 goog.require('org.apache.flex.events.EventDispatcher');
-goog.require('org.apache.flex.utils.IE8Utils');
+
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
+ * @extends {org.apache.flex.events.EventDispatcher}
  */
 org.apache.flex.core.HTMLElementWrapper = function() {
-    org.apache.flex.FlexObject.call(this);
-
-    /**
-     * @private
-     * @type {Array}
-     */
-    this.strand;
+  goog.base(this);
 };
 goog.inherits(org.apache.flex.core.HTMLElementWrapper,
-    org.apache.flex.FlexObject);
+    org.apache.flex.events.EventDispatcher);
+
 
 /**
- * @this {org.apache.flex.core.HTMLElementWrapper}
- * @param {string} type The event type.
- * @param {function(?): ?} fn The event handler.
+ * @protected
+ * @type {Object}
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.addEventListener =
-    function(type, fn) {
-    if (this.element.addEventListener) {
-        this.element.addEventListener(type, fn);
-    }
-    else if (this.element.attachEvent || !this.element.dispatchEvent) {
-        org.apache.flex.utils.IE8Utils.addEventListener(this, this.element, type, fn);
-    } 
-};
+org.apache.flex.core.HTMLElementWrapper.prototype.element = null;
+
 
 /**
- * @this {org.apache.flex.core.HTMLElementWrapper}
- * @param {org.apache.flex.events.Event} evt The event.
+ * @protected
+ * @type {Object}
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.dispatchEvent = 
-    function(evt) {
-    if (this.element.addEventListener)
-    {
-        try {
-            this.element.dispatchEvent(evt);
-        } catch (e) {
-            var domevt = this.createEvent(evt.type);
-            this.element.dispatchEvent(domevt);
-        }
-    }
-    else if (this.element.attachEvent || !this.element.dispatchEvent)
-        org.apache.flex.utils.IE8Utils.dispatchEvent(this, this.element, evt)
-};
+org.apache.flex.core.HTMLElementWrapper.prototype.strand = null;
+
 
 /**
+ * @expose
  * @this {org.apache.flex.core.HTMLElementWrapper}
- * @param {string} type The event type.
+ * @param {Object} bead The new bead.
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.createEvent = 
-    function(type) {
-    return org.apache.flex.events.EventDispatcher.createEvent(type);
+org.apache.flex.core.HTMLElementWrapper.prototype.addBead = function(bead) {
+  if (!this.strand) {
+    this.strand = [];
+  }
+
+  this.strand.push(bead);
+
+  if (typeof bead.constructor.$implements !== 'undefined' &&
+      typeof bead.constructor.$implements.IBeadModel !== 'undefined') {
+    this.model = bead;
+  }
+
+  bead.set_strand(this);
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.HTMLElementWrapper}
- * @param {object} bead The new bead.
+ * @param {Object} classOrInterface The requested bead type.
+ * @return {Object} The bead.
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.addBead = function(bead) {
-    if (!this.strand)
-        this.strand = [];
-    this.strand.push(bead);
-    if (typeof(bead.constructor.$implements) != 'undefined' &&
-        typeof(bead.constructor.$implements.IBeadModel != 'undefined'))
-        this.model = bead;
-    bead.set_strand(this);
+org.apache.flex.core.HTMLElementWrapper.prototype.getBeadByType =
+    function(classOrInterface) {
+  var bead, i, n;
+
+  n = this.strand.length;
+  for (i = 0; i < n; i++) {
+    bead = this.strand[i];
+
+    if (bead instanceof classOrInterface) {
+      return bead;
+    }
+
+    if (bead.constructor.$implements.hasOwnProperty(classOrInterface)) {
+      return bead;
+    }
+  }
+
+  return null;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.HTMLElementWrapper}
- * @param {object} classOrInterface The requested bead type.
- * @return {object} The bead.
+ * @return {Array} The array of descriptors.
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.getBeadByType =
-                                    function(classOrInterface) {
-    var n;
-    n = this.strand.length;
-    for (var i = 0; i < n; i++)
-    {
-        var bead = strand[i];
-        if (bead instanceof classOrInterface)
-            return bead;
-        if (classOrInterface in bead.constructor.$implements)
-            return bead;
-    }
-    return null;
+org.apache.flex.core.HTMLElementWrapper.prototype.get_MXMLDescriptor =
+    function() {
+  return null;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.HTMLElementWrapper}
- * @param {object} bead The bead to remove.
- * @return {object} The bead.
+ * @return {Array} The array of properties.
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.removeBead = function(bead) {
-    var n = this.strand.length;
-    for (var i = 0; i < n; i++)
-    {
-        var bead = strand[i];
-        if (bead == value)
-        {
-            this.strand.splice(i, 1);
-            return bead;
-        }
-    }
-    return null;
+org.apache.flex.core.HTMLElementWrapper.prototype.get_MXMLProperties =
+    function() {
+  return null;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.HTMLElementWrapper}
- * @return {Array} The array of descriptors.
+ * @param {Object} bead The bead to remove.
+ * @return {Object} The bead.
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.get_MXMLDescriptor = function() {
-    return null;
+org.apache.flex.core.HTMLElementWrapper.prototype.removeBead = function(bead) {
+  var i, n, value;
+
+  n = this.strand.length;
+  for (i = 0; i < n; i++) {
+    value = this.strand[i];
+
+    if (bead === value) {
+      this.strand.splice(i, 1);
+
+      return bead;
+    }
+  }
+
+  return null;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.HTMLElementWrapper}
- * @return {Array} The array of properties.
+ * @param {Object} value The new strand.
  */
-org.apache.flex.core.HTMLElementWrapper.prototype.get_MXMLProperties = function() {
-    return null;
+org.apache.flex.core.HTMLElementWrapper.prototype.set_strand =
+    function(value) {
+  if (this.strand !== value) {
+    this.strand = value;
+  }
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/core/IDocument.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/IDocument.js b/frameworks/js/FlexJS/src/org/apache/flex/core/IDocument.js
deleted file mode 100644
index fb8d955..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/IDocument.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-goog.provide('org.apache.flex.core.IDocument');
-
-goog.require('org.apache.flex.FlexObject');
-
-/**
- * @constructor
- * @extends {org.apache.flex.FlexObject}
- */
-org.apache.flex.core.IDocument = function() {
-    org.apache.flex.FlexObject.call(this);
-};
-goog.inherits(
-    org.apache.flex.core.IDocument, org.apache.flex.FlexObject
-);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js
new file mode 100644
index 0000000..810944f
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ListBase.js
@@ -0,0 +1,185 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('org.apache.flex.core.ListBase');
+
+goog.require('org.apache.flex.core.UIBase');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.core.ListBase = function() {
+  goog.base(this);
+
+  /**
+   * @protected
+   * @type {Array.<Object>}
+   */
+  this.dataProvider_;
+
+  /**
+   * @private
+   * @type {number}
+   */
+  this.selectedIndex_ = -1;
+};
+goog.inherits(org.apache.flex.core.ListBase,
+    org.apache.flex.core.UIBase);
+
+
+/**
+ * @override
+ * @this {org.apache.flex.core.ListBase}
+ * @param {Object} p The parent element.
+ */
+org.apache.flex.core.ListBase.prototype.addToParent = function(p) {
+  this.element = document.createElement('select');
+  goog.events.listen(this.element, 'change',
+      goog.bind(this.changeHandler, this));
+
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
+};
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ListBase}
+ * @return {Array.<Object>} The collection of data.
+ */
+org.apache.flex.core.ListBase.prototype.get_dataProvider =
+    function() {
+  return this.dataProvider_;
+};
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ListBase}
+ * @param {Array.<Object>} value The text setter.
+ */
+org.apache.flex.core.ListBase.prototype.set_dataProvider =
+    function(value) {
+  var dp, i, n, opt;
+
+  this.dataProvider_ = value;
+
+  dp = this.element.options;
+  n = dp.length;
+  for (i = 0; i < n; i++) {
+    dp.remove(0);
+  }
+
+  n = value.length;
+  for (i = 0; i < n; i++) {
+    opt = document.createElement('option');
+    opt.text = value[i];
+    dp.add(opt);
+  }
+};
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ListBase}
+ * @return {number} The selected index.
+ */
+org.apache.flex.core.ListBase.prototype.get_selectedIndex =
+    function() {
+  if (typeof this.element.selectedIndex !== 'undefined') {
+    return this.element.selectedIndex;
+  } else {
+    return this.selectedIndex_;
+  }
+};
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ListBase}
+ * @param {number} value The selected index.
+ */
+org.apache.flex.core.ListBase.prototype.set_selectedIndex =
+    function(value) {
+  this.selectedIndex_ = value;
+
+  if (this.element.selectedIndex) {
+    this.element.selectedIndex = value;
+  }
+};
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ListBase}
+ * @return {Object} The selected item.
+ */
+org.apache.flex.core.ListBase.prototype.get_selectedItem =
+    function() {
+  var si;
+
+  si = this.get_selectedIndex();
+
+  if (!this.dataProvider_ || si < 0 ||
+      si >= this.dataProvider_.length) {
+    return null;
+  }
+
+  return this.dataProvider_[si];
+};
+
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.ListBase}
+ * @param {Object} value The selected item.
+ */
+org.apache.flex.core.ListBase.prototype.set_selectedItem =
+    function(value) {
+  var dp, i, n;
+
+  dp = this.dataProvider_;
+  n = dp.length;
+  for (i = 0; i < n; i++) {
+    if (dp[i] === value) {
+      break;
+    }
+  }
+
+  if (i < n) {
+    this.selectedIndex_ = i;
+
+    if (this.element.selectedIndex) {
+      this.element.selectedIndex = i;
+    }
+
+    if (this.element.childNodes) {
+      this.element.childNodes.item(0).value = dp[i];
+    }
+  }
+};
+
+
+/**
+ * @protected
+ * @this {org.apache.flex.core.ListBase}
+ */
+org.apache.flex.core.ListBase.prototype.changeHandler =
+    function() {
+  this.dispatchEvent('change');
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 b997538..a54a50f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
@@ -14,15 +14,10 @@
 
 goog.provide('org.apache.flex.core.SimpleCSSValuesImpl');
 
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.core.SimpleCSSValuesImpl = function() {
-    org.apache.flex.FlexObject.call(this);
 };
-goog.inherits(
-    org.apache.flex.core.SimpleCSSValuesImpl, org.apache.flex.FlexObject
-);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleValuesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleValuesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleValuesImpl.js
index bf17d95..84ffc8e 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleValuesImpl.js
@@ -14,15 +14,10 @@
 
 goog.provide('org.apache.flex.core.SimpleValuesImpl');
 
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.core.SimpleValuesImpl = function() {
-    org.apache.flex.FlexObject.call(this);
 };
-goog.inherits(
-    org.apache.flex.core.SimpleValuesImpl, org.apache.flex.FlexObject
-);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 dedbb0d..aaad59a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -14,104 +14,111 @@
 
 goog.provide('org.apache.flex.core.UIBase');
 
-goog.require('org.apache.flex.FlexGlobal');
 goog.require('org.apache.flex.core.HTMLElementWrapper');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.HTMLElementWrapper}
  */
 org.apache.flex.core.UIBase = function() {
-    org.apache.flex.core.HTMLElementWrapper.call(this);
-
-    /**
-     * @protected
-     * @type {Object}
-     */
-    this.positioner;
+  goog.base(this);
 
+  /**
+   * @protected
+   * @type {Object}
+   */
+  this.positioner;
 };
 goog.inherits(org.apache.flex.core.UIBase,
     org.apache.flex.core.HTMLElementWrapper);
 
+
 /**
  * @this {org.apache.flex.core.UIBase}
  * @param {Object} p The parent element.
  */
 org.apache.flex.core.UIBase.prototype.addToParent = function(p) {
-    this.element = document.createElement('div');
+  this.element = document.createElement('div');
 
-    p.appendChild(this.element);
+  p.appendChild(this.element);
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
  * @param {number} pixels The pixel count from the left edge.
  */
 org.apache.flex.core.UIBase.prototype.set_x = function(pixels) {
-    this.positioner.style.position = 'absolute';
-    this.positioner.style.left = pixels.toString() + 'px';
+  this.positioner.style.position = 'absolute';
+  this.positioner.style.left = pixels.toString() + 'px';
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
  * @param {number} pixels The pixel count from the top edge.
  */
 org.apache.flex.core.UIBase.prototype.set_y = function(pixels) {
-    this.positioner.style.position = 'absolute';
-    this.positioner.style.top = pixels.toString() + 'px';
+  this.positioner.style.position = 'absolute';
+  this.positioner.style.top = pixels.toString() + 'px';
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
  * @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.positioner.style.width = pixels.toString() + 'px';
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
  * @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.positioner.style.height = pixels.toString() + 'px';
 };
 
+
 /**
  * @expose
  * @type {string}
  */
 org.apache.flex.core.UIBase.prototype.id;
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
  * @return {string} The id.
  */
 org.apache.flex.core.UIBase.prototype.get_id = function() {
-    return this.id;
+  return this.id;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
- * @param {object} value The new id.
+ * @param {Object} value The new id.
  */
 org.apache.flex.core.UIBase.prototype.set_id = function(value) {
-    if (this.id != value)
-    {
-        this.element.id = value;
-        this.id = value;
-        var evt = this.createEvent('idChanged');
-        this.dispatchEvent(evt);
-    }
+  if (this.id !== value) {
+    this.element.id = value;
+    this.id = value;
+    this.dispatchEvent('idChanged');
+  }
 };
 
+
 /**
  * @expose
  * @type {string}
@@ -148,25 +155,26 @@ org.apache.flex.core.UIBase.prototype.set_className = function(value) {
  */
 org.apache.flex.core.UIBase.prototype.model;
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
- * @return {object} The model.
+ * @return {Object} The model.
  */
 org.apache.flex.core.UIBase.prototype.get_model = function() {
-    return this.model;
+  return this.model;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
- * @param {object} value The new model.
+ * @param {Object} value The new model.
  */
 org.apache.flex.core.UIBase.prototype.set_model = function(value) {
-    if (this.model != value)
-    {
-        this.addBead(value);
-        this.dispatchEvent(new Event('modelChanged'));
-    }
+  if (this.model !== value) {
+    this.addBead(value);
+    this.dispatchEvent('modelChanged');
+  }
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
index 2a083d6..754d210 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ValuesManager.js
@@ -14,19 +14,17 @@
 
 goog.provide('org.apache.flex.core.ValuesManager');
 
-goog.require('org.apache.flex.FlexObject');
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexObject}
  */
 org.apache.flex.core.ValuesManager = function() {
-    org.apache.flex.FlexObject.call(this);
 };
-goog.inherits(org.apache.flex.core.ValuesManager, org.apache.flex.FlexObject);
+
 
 /**
  * @expose
- * @type {org.apache.flex.core.SimpleValuesImpl}
+ * @type {org.apache.flex.core.ValuesManager}
  */
 org.apache.flex.core.ValuesManager.prototype.valuesImpl;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/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 f0c4ade..b8f4729 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -14,53 +14,52 @@
 
 goog.provide('org.apache.flex.core.ViewBase');
 
-goog.require('org.apache.flex.FlexGlobal');
-
 goog.require('org.apache.flex.core.UIBase');
-
 goog.require('org.apache.flex.utils.MXMLDataInterpreter');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.core.ViewBase = function() {
-    org.apache.flex.core.UIBase.call(this);
-
-     /**
-      * @private
-      * @type {org.apache.flex.core.ViewBase}
-      */
-      this.currentObject_;
+  goog.base(this);
 };
 goog.inherits(org.apache.flex.core.ViewBase, org.apache.flex.core.UIBase);
 
+
 /**
  * @expose
  * @type {Object}
  */
 org.apache.flex.core.ViewBase.prototype.applicationModel;
 
+
 /**
  * @expose
  * @type {Array}
  */
 org.apache.flex.core.ViewBase.prototype.MXMLProperties;
 
+
 /**
  * @expose
  * @type {Array}
  */
 org.apache.flex.core.ViewBase.prototype.MXMLDescriptor;
 
+
 /**
  * @this {org.apache.flex.core.ViewBase}
  * @param {Object} model The model for this view.
  */
 org.apache.flex.core.ViewBase.prototype.initUI = function(model) {
-    this.applicationModel = model;
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
-            this.get_MXMLProperties());
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
-            this, this.get_MXMLDescriptor());
+  this.applicationModel = model;
+
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
+      this.get_MXMLProperties());
+
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
+      this, this.get_MXMLDescriptor());
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
index a218459..b1a05ef 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
@@ -14,23 +14,36 @@
 
 goog.provide('org.apache.flex.events.CustomEvent');
 
+goog.require('goog.events.Event');
+
+
+
 /**
  * @constructor
+ * @extends {goog.events.Event}
+ * @param {string} type The event type.
  */
 org.apache.flex.events.CustomEvent = function(type) {
-    this.type = type;
+  goog.base(this);
+  
+  this.type = type;
 };
+goog.inherits(org.apache.flex.events.CustomEvent,
+    goog.events.Event);
+
 
 /**
+ * @expose
  * @this {org.apache.flex.events.CustomEvent}
  * @param {string} type The event type.
  */
 org.apache.flex.events.CustomEvent.prototype.init = function(type) {
-    this.type_ = type;
+  this.type = type;
 };
 
+
 /**
- * @expose 
+ * @expose
  * @type {string} type The event type.
  */
 org.apache.flex.events.CustomEvent.prototype.type;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js b/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
index 3c0e20c..51752cc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
@@ -14,24 +14,36 @@
 
 goog.provide('org.apache.flex.events.Event');
 
+goog.require('goog.events.Event');
+
+
+
 /**
  * @constructor
+ * @extends {goog.events.Event}
+ * @param {string} type The event type.
  */
 org.apache.flex.events.Event = function(type) {
-    this.type = type;
+  goog.base(this, type);
+
+  this.type = type;
 };
+goog.inherits(org.apache.flex.events.Event,
+    goog.events.Event);
+
 
 /**
+ * @expose
  * @this {org.apache.flex.events.Event}
  * @param {string} type The event type.
  */
 org.apache.flex.events.Event.prototype.init = function(type) {
-    this.type = type;
+  this.type = type;
 };
 
+
 /**
- * @expose 
+ * @expose
  * @type {string} type The event type.
  */
-org.apache.flex.events.Event.prototype.type;
-
+org.apache.flex.events.CustomEvent.prototype.type;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
index fb479f3..f9d1aef 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
@@ -14,96 +14,44 @@
 
 goog.provide('org.apache.flex.events.EventDispatcher');
 
-goog.require('org.apache.flex.FlexGlobal');
+goog.require('goog.events.EventTarget');
+
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.FlexGlobal}
+ * @extends {goog.events.EventTarget}
  */
 org.apache.flex.events.EventDispatcher = function() {
-    org.apache.flex.FlexGlobal.call(this);
+  goog.base(this);
 
-    /**
-     * @private
-     * @type {Object}
-     */
-    this.listeners_ = {};
 };
 goog.inherits(org.apache.flex.events.EventDispatcher,
-    org.apache.flex.FlexGlobal);
-
-/**
- * @expose
- * @this {org.apache.flex.events.EventDispatcher}
- * @param {string} type The event type.
- * @param {function(?): ?} fn The event handler.
- */
-org.apache.flex.events.EventDispatcher.prototype.addEventListener = function(type, fn) {
-    if (!this.listeners_.type) {
-        this.listeners_[type] = [];
-    }
+    goog.events.EventTarget);
 
-    this.listeners_[type].push(fn);
-};
 
 /**
+ * @override
  * @expose
  * @this {org.apache.flex.events.EventDispatcher}
  * @param {string} type The event type.
  * @param {function(?): ?} fn The event handler.
  */
-org.apache.flex.events.EventDispatcher.prototype.removeEventListener = function(type, fn) {
-    if (!this.listeners_.type) {
-        return;
-    }
-
-    var listeners = this.listeners_[type];
-    var n = listeners.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (fn == listeners[i])
-        {
-            listeners.splice(i, 1);
-            break;
-        }
-    }
-};
-
-/**
- * @expose
- * @this {org.apache.flex.events.EventDispatcher}
- * @param {Object} event The event to dispatch.
- */
-org.apache.flex.events.EventDispatcher.prototype.dispatchEvent = function(event) {
-    var arr, i, n, type;
-
-    type = event.type;
-
-    if (this.listeners_[type]) {
-        arr = this.listeners_[type];
-        n = arr.length;
-        for (i = 0; i < n; i++) {
-            arr[i](event);
-        }
-    }
-};
-
-/**
- * @expose
- * @param {String} type The event type.
- * @returns {Object} event The event to dispatch.
- */
-org.apache.flex.events.EventDispatcher.createEvent = function(type) {
-    var evt;
-    if (document.createEvent)
-    {
-        evt = document.createEvent('Event');
-        evt.initEvent(type, false, false);
-    }
-    else if (document.createEventObject)
-    {
-        evt = document.createEventObject();
-        evt.type = type;
-    }
-    return evt;
+org.apache.flex.events.EventDispatcher.prototype.addEventListener =
+    function(type, fn) {
+  var source;
+
+  /**
+   *  A bit of a hack, but for 'native' HTML element based controls, we
+   *  want to listen to the 'native' events from the element; for other
+   *  types of controls, we listen to 'custom' events.
+   */
+  source = this;
+  if (this.element && this.element.nodeName &&
+      this.element.nodeName.toLowerCase() !== 'div' &&
+      this.element.nodeName.toLowerCase() !== 'body') {
+    source = this.element;
+  }
+
+  goog.events.listen(source, type, fn);
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/CheckBox.js
index 1743d7c..e31ad1d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/CheckBox.js
@@ -16,70 +16,79 @@ goog.provide('org.apache.flex.html.staticControls.CheckBox');
 
 goog.require('org.apache.flex.core.UIBase');
 
-var cbCount = 0;
+
 
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html.staticControls.CheckBox = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.CheckBox, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.CheckBox,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html.staticControls.CheckBox}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html.staticControls.CheckBox.prototype.addToParent = 
+org.apache.flex.html.staticControls.CheckBox.prototype.addToParent =
     function(p) {
-	this.element = document.createElement('label');
-	
-	var cb = document.createElement('input');
-	cb.type = 'checkbox';
-	this.element.appendChild(cb);
-	this.element.appendChild(document.createTextNode("check box"));
-	
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
+  var cb;
+
+  this.element = document.createElement('label');
+
+  cb = document.createElement('input');
+  cb.type = 'checkbox';
+  this.element.appendChild(cb);
+  this.element.appendChild(document.createTextNode('check box'));
+
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.CheckBox}
  * @return {string} The text getter.
  */
 org.apache.flex.html.staticControls.CheckBox.prototype.get_text = function() {
-    return this.element.childNodes.item(1).nodeValue;
+  return this.element.childNodes.item(1).nodeValue;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.CheckBox}
  * @param {string} value The text setter.
  */
-org.apache.flex.html.staticControls.CheckBox.prototype.set_text = function(value) {
-    this.element.childNodes.item(1).nodeValue = value;
+org.apache.flex.html.staticControls.CheckBox.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(1).nodeValue = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.CheckBox}
  * @return {bool} The selected getter.
  */
-org.apache.flex.html.staticControls.CheckBox.prototype.get_selected = function() {
-    return this.element.childNodes.item(0).checked;
+org.apache.flex.html.staticControls.CheckBox.prototype.get_selected =
+    function() {
+  return this.element.childNodes.item(0).checked;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.CheckBox}
  * @param {bool} value The selected setter.
  */
-org.apache.flex.html.staticControls.CheckBox.prototype.set_selected = function(value) {
-    this.element.childNodes.item(0).checked = value;
+org.apache.flex.html.staticControls.CheckBox.prototype.set_selected =
+    function(value) {
+  this.element.childNodes.item(0).checked = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/ComboBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/ComboBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/ComboBox.js
index 6a5472c..953c858 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/ComboBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/ComboBox.js
@@ -14,26 +14,19 @@
 
 goog.provide('org.apache.flex.html.staticControls.ComboBox');
 
-goog.require('org.apache.flex.core.UIBase');
+goog.require('org.apache.flex.core.ListBase');
+
 
 
 /**
  * @constructor
- * @extends {org.apache.flex.core.UIBase}
+ * @extends {org.apache.flex.core.ListBase}
  */
 org.apache.flex.html.staticControls.ComboBox = function() {
-    org.apache.flex.core.UIBase.call(this);
-    
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this._dataProvider;
-    this._selectedIndex = -1;
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.ComboBox, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.ComboBox,
+    org.apache.flex.core.ListBase);
 
 
 /**
@@ -41,220 +34,170 @@ goog.inherits(
  * @this {org.apache.flex.html.staticControls.ComboBox}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html.staticControls.ComboBox.prototype.addToParent = 
-function(p) {
-	this.element = document.createElement('div');
-	
-	var input = document.createElement('input');
-	input.style.position = "absolute";
-	input.style.width = "80px";
-	this.element.appendChild(input);
-	
-	var button = document.createElement('div');
-	button.style.position = "absolute";
-	button.style.top = "0px";
-	button.style.right = "0px";
-	button.style.background = "#bbb";
-	button.style.width = "16px";
-	button.style.height = "20px";
-	button.style.margin = "0";
-	button.style.border = "solid #609 1px";
-	button.onclick = org.apache.flex.FlexGlobal.createProxy(
-                this, this.buttonClicked);
-	this.element.appendChild(button);
-	
-	this.element.style.position = "relative";
-	
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
-    
-    // add a click handler to p's parentElement so that a click
-    // outside of the combo box can dismiss the pop-up should it
-    // be visible
-    p.parentElement.onclick = org.apache.flex.FlexGlobal.createProxy(
-                this, this.dismissPopup);
+org.apache.flex.html.staticControls.ComboBox.prototype.addToParent =
+    function(p) {
+  var button, input;
+
+  this.element = document.createElement('div');
+
+  input = document.createElement('input');
+  input.style.position = 'absolute';
+  input.style.width = '80px';
+  this.element.appendChild(input);
+
+  button = document.createElement('div');
+  button.style.position = 'absolute';
+  button.style.top = '0px';
+  button.style.right = '0px';
+  button.style.background = '#bbb';
+  button.style.width = '16px';
+  button.style.height = '20px';
+  button.style.margin = '0';
+  button.style.border = 'solid #609 1px';
+  goog.events.listen(button, 'click', goog.bind(this.buttonClicked, this));
+  this.element.appendChild(button);
+
+  this.element.style.position = 'relative';
+
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
+
+  // add a click handler to p's parentElement so that a click
+  // outside of the combo box can dismiss the pop-up should it
+  // be visible
+  goog.events.listen(p.parentElement, 'click',
+      goog.bind(this.dismissPopup, this));
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.ComboBox}
+ * @param {string} event The event.
  */
 org.apache.flex.html.staticControls.ComboBox.prototype.selectChanged =
-function(event) {
-	var select = event.currentTarget;
-//	var input = this.element.childNodes.item(0);
-//	input.value = select.value;
-	this.set_selectedItem(select.value);
-	
-	this.popup.parentNode.removeChild(this.popup);
-	this.popup = null;
-	
-	evt = this.createEvent('change');
-    this.dispatchEvent(evt);
-};
+    function(event) {
+  var select;
 
+  select = event.currentTarget;
 
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.ComboBox}
- */
-org.apache.flex.html.staticControls.ComboBox.prototype.dismissPopup =
-function(event) {
+  this.set_selectedItem(select.options[select.selectedIndex].value);
 
-	// remove the popup if it already exists
-	if( this.popup ) {
-		this.popup.parentNode.removeChild(this.popup);
-		this.popup = null;
-	}
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.ComboBox}
- */
-org.apache.flex.html.staticControls.ComboBox.prototype.buttonClicked =
-function(event) {
-
-	event.stopPropagation();
-	
-	// remove the popup if it already exists
-	if( this.popup ) {
-		this.popup.parentNode.removeChild(this.popup);
-		this.popup = null;
-		return;
-	}
-	
-	var input = this.element.childNodes.item(0);
-	
-	var pn = this.element;
-	var top = pn.offsetTop + input.offsetHeight;
-	var left = pn.offsetLeft;
-	var width = pn.offsetWidth;
-	
-    var popup = document.createElement('div');
-    popup.className = 'popup';
-    popup.id = 'test';
-    popup.style.position = "absolute";
-    popup.style.top = top.toString() + "px";
-    popup.style.left = left.toString() + "px";
-    popup.style.width = width.toString() + "px";
-    popup.style.margin = "0px auto";
-    popup.style.padding = "0px";
-    popup.style.zIndex = "10000";
-    
-    var select = document.createElement('select');
-    select.style.width = width.toString() + "px";
-	select.onchange = org.apache.flex.FlexGlobal.createProxy(
-                this, this.selectChanged);
-    var opts = select.options;
-
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (i = 0; i < n; i++)
-    {
-        var opt = document.createElement('option');
-        opt.text = dp[i];
-        opts.add(opt);
-    }
-    select.size = n;
-    if( this._selectedIndex < 0 ) select.value = null;
-    else select.value = this._dataProvider[this._selectedIndex];
-    
-    this.popup = popup;
-
-    popup.appendChild(select); 
-    document.body.appendChild(popup);
-    
+  this.popup.parentNode.removeChild(this.popup);
+  this.popup = null;
 
+  this.dispatchEvent(event);
 };
 
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.ComboBox}
- * @return {Array.<Object>} The collection of data.
- */
-org.apache.flex.html.staticControls.ComboBox.prototype.get_dataProvider =
-function() {
-    return this._dataProvider;
-};
 
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.ComboBox}
- * @param {Array.<Object>} value The text setter.
+ * @param {string} event The event.
  */
-org.apache.flex.html.staticControls.ComboBox.prototype.set_dataProvider =
-function(value) {
-    this._dataProvider = value;
+org.apache.flex.html.staticControls.ComboBox.prototype.dismissPopup =
+    function(event) {
+  // remove the popup if it already exists
+  if (this.popup) {
+    this.popup.parentNode.removeChild(this.popup);
+    this.popup = null;
+  }
 };
 
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.ComboBox}
- * @return {int} The selected index.
- */
-org.apache.flex.html.staticControls.ComboBox.prototype.get_selectedIndex =
-function() {
-    return this._selectedIndex;
-};
 
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.ComboBox}
- * @param {int} value The selected index.
+ * @param {string} event The event.
  */
-org.apache.flex.html.staticControls.ComboBox.prototype.set_selectedIndex =
-function(value) {
-    this._selectedIndex = value;
+org.apache.flex.html.staticControls.ComboBox.prototype.buttonClicked =
+    function(event) {
+  var dp, i, input, left, n, opt, opts, pn, popup, select, si, top, width;
+
+  event.stopPropagation();
+
+  if (this.popup) {
+    this.dismissPopup();
+
+    return;
+  }
+
+  input = this.element.childNodes.item(0);
+
+  pn = this.element;
+  top = pn.offsetTop + input.offsetHeight;
+  left = pn.offsetLeft;
+  width = pn.offsetWidth;
+
+  popup = document.createElement('div');
+  popup.className = 'popup';
+  popup.id = 'test';
+  popup.style.position = 'absolute';
+  popup.style.top = top.toString() + 'px';
+  popup.style.left = left.toString() + 'px';
+  popup.style.width = width.toString() + 'px';
+  popup.style.margin = '0px auto';
+  popup.style.padding = '0px';
+  popup.style.zIndex = '10000';
+
+  select = document.createElement('select');
+  select.style.width = width.toString() + 'px';
+  goog.events.listen(select, 'change', goog.bind(this.selectChanged, this));
+  opts = select.options;
+
+  dp = this.get_dataProvider();
+  n = dp.length;
+  for (i = 0; i < n; i++) {
+    opt = document.createElement('option');
+    opt.text = dp[i];
+    opts.add(opt);
+  }
+
+  select.size = n;
+
+  si = this.get_selectedIndex();
+  if (si < 0) {
+    select.value = null;
+  } else {
+    select.value = dp[si];
+  }
+
+  this.popup = popup;
+
+  popup.appendChild(select);
+  document.body.appendChild(popup);
 };
 
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.ComboBox}
- * @return {Object} The selected item.
- */
-org.apache.flex.html.staticControls.ComboBox.prototype.get_selectedItem =
-function() {
-	if( this._dataProvider == null || this._selectedIndex < 0 || this._selectedIndex >= this._dataProvider.length ) return null;
-    return this._dataProvider[this._selectedIndex];
-};
 
 /**
+ * @override
  * @expose
  * @this {org.apache.flex.html.staticControls.ComboBox}
- * @param {Object} value The selected item.
+ * @param {Array.<Object>} value The collection of data.
  */
-org.apache.flex.html.staticControls.ComboBox.prototype.set_selectedItem =
-function(value) {
-
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (dp[i] == value)
-            break;
-    }
-    if (i < n) {
-        this._selectedIndex = i;
-        this.element.childNodes.item(0).value = this._dataProvider[i];
-    }
+org.apache.flex.html.staticControls.ComboBox.prototype.set_dataProvider =
+    function(value) {
+  this.dataProvider_ = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.ComboBox}
  * @return {string} The text getter.
  */
 org.apache.flex.html.staticControls.ComboBox.prototype.get_text = function() {
-    return this.element.childNodes.item(0).value;
+  return this.element.childNodes.item(0).value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.ComboBox}
  * @param {string} value The text setter.
  */
-org.apache.flex.html.staticControls.ComboBox.prototype.set_text = function(value) {
-    this.element.childNodes.item(0).value = value;
+org.apache.flex.html.staticControls.ComboBox.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(0).value = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DropDownList.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DropDownList.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DropDownList.js
index f6d15e5..e5c9a31 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DropDownList.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/DropDownList.js
@@ -14,131 +14,16 @@
 
 goog.provide('org.apache.flex.html.staticControls.DropDownList');
 
-goog.require('org.apache.flex.core.UIBase');
+goog.require('org.apache.flex.core.ListBase');
 
-/**
- * @constructor
- * @extends {org.apache.flex.core.UIBase}
- */
-org.apache.flex.html.staticControls.DropDownList = function() {
-    org.apache.flex.core.UIBase.call(this);
-
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this._dataProvider;
 
-};
-goog.inherits(
-    org.apache.flex.html.staticControls.DropDownList, org.apache.flex.core.UIBase
-);
-
-/**
- * @override
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @param {Object} p The parent element.
- */
-org.apache.flex.html.staticControls.DropDownList.prototype.addToParent = function(p) {
-    this.element = document.createElement('select');
-    //this.element.onchange = org.apache.flex.FlexGlobal.createProxy(
-    //            this, this.changeHandler);
-                
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @return {Array.<Object>} The collection of data.
- */
-org.apache.flex.html.staticControls.DropDownList.prototype.get_dataProvider =
-function() {
-    return this._dataProvider;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @param {Array.<Object>} value The text setter.
- */
-org.apache.flex.html.staticControls.DropDownList.prototype.set_dataProvider =
-function(value) {
-    this._dataProvider = value;
-
-    var dp = this.element.options;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-        dp.remove(0);
-
-    n = value.length;
-    for (i = 0; i < n; i++)
-    {
-        var opt = document.createElement('option');
-        opt.text = value[i];
-        dp.add(opt);
-    }
-};
 
 /**
- * @expose
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @return {int} The selected index.
- */
-org.apache.flex.html.staticControls.DropDownList.prototype.get_selectedIndex =
-function() {
-    return this.element.selectedIndex;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @param {int} value The selected index.
- */
-org.apache.flex.html.staticControls.DropDownList.prototype.set_selectedIndex =
-function(value) {
-    this.element.selectedIndex = value;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @return {Object} The selected item.
- */
-org.apache.flex.html.staticControls.DropDownList.prototype.get_selectedItem =
-function() {
-    return this._dataProvider[this.element.selectedIndex];
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @param {Object} value The selected item.
- */
-org.apache.flex.html.staticControls.DropDownList.prototype.set_selectedItem =
-function(value) {
-
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (dp[i] == value)
-            break;
-    }
-    if (i < n)
-        this.element.selectedIndex = i;
-};
-
-/**
- * @protected
- * @this {org.apache.flex.html.staticControls.DropDownList}
- * @return {Object} The selected item.
+ * @constructor
+ * @extends {org.apache.flex.core.ListBase}
  */
-org.apache.flex.html.staticControls.DropDownList.prototype.changeHandler =
-function() {
-    var evt = this.createEvent('change');
-    this.dispatchEvent(evt);
+org.apache.flex.html.staticControls.DropDownList = function() {
+  goog.base(this);
 };
-
+goog.inherits(org.apache.flex.html.staticControls.DropDownList,
+    org.apache.flex.core.ListBase);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/Label.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/Label.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/Label.js
index 48fa9ae..875607a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/Label.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/Label.js
@@ -16,16 +16,18 @@ goog.provide('org.apache.flex.html.staticControls.Label');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html.staticControls.Label = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.Label, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.Label,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
@@ -33,25 +35,27 @@ goog.inherits(
  * @param {Object} p The parent element.
  */
 org.apache.flex.html.staticControls.Label.prototype.addToParent = function(p) {
-    goog.base(this, 'addToParent', p);
+  goog.base(this, 'addToParent', p);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.Label}
  * @return {string} The text getter.
  */
 org.apache.flex.html.staticControls.Label.prototype.get_text = function() {
-    return this.element.innerHTML;
+  return this.element.innerHTML;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.Label}
  * @param {string} value The text setter.
  */
 org.apache.flex.html.staticControls.Label.prototype.set_text = function(value) {
-    this.element.innerHTML = value;
+  this.element.innerHTML = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js
index 911b72b..09715de 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/List.js
@@ -14,25 +14,20 @@
 
 goog.provide('org.apache.flex.html.staticControls.List');
 
-goog.require('org.apache.flex.core.UIBase');
+goog.require('org.apache.flex.core.ListBase');
+
+
 
 /**
  * @constructor
- * @extends {org.apache.flex.core.UIBase}
+ * @extends {org.apache.flex.core.ListBase}
  */
 org.apache.flex.html.staticControls.List = function() {
-    org.apache.flex.core.UIBase.call(this);
-
-    /**
-     * @private
-     * @type {Array.<Object>}
-     */
-    this._dataProvider;
-
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.List, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.List,
+    org.apache.flex.core.ListBase);
+
 
 /**
  * @override
@@ -40,106 +35,7 @@ goog.inherits(
  * @param {Object} p The parent element.
  */
 org.apache.flex.html.staticControls.List.prototype.addToParent = function(p) {
-    this.element = document.createElement('select');
-    //this.element.onchange = org.apache.flex.FlexGlobal.createProxy(
-    //            this, this.changeHandler);
-    this.element.size = 5;
-                
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.List}
- * @return {Array.<Object>} The collection of data.
- */
-org.apache.flex.html.staticControls.List.prototype.get_dataProvider =
-function() {
-    return this._dataProvider;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.List}
- * @param {Array.<Object>} value The text setter.
- */
-org.apache.flex.html.staticControls.List.prototype.set_dataProvider =
-function(value) {
-    this._dataProvider = value;
-
-    var dp = this.element.options;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-        dp.remove(0);
-
-    n = value.length;
-    for (i = 0; i < n; i++)
-    {
-        var opt = document.createElement('option');
-        opt.text = value[i];
-        dp.add(opt);
-    }
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.List}
- * @return {int} The selected index.
- */
-org.apache.flex.html.staticControls.List.prototype.get_selectedIndex =
-function() {
-    return this.element.selectedIndex;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.List}
- * @param {int} value The selected index.
- */
-org.apache.flex.html.staticControls.List.prototype.set_selectedIndex =
-function(value) {
-    this.element.selectedIndex = value;
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.List}
- * @return {Object} The selected item.
- */
-org.apache.flex.html.staticControls.List.prototype.get_selectedItem =
-function() {
-    return this._dataProvider[this.element.selectedIndex];
-};
-
-/**
- * @expose
- * @this {org.apache.flex.html.staticControls.List}
- * @param {Object} value The selected item.
- */
-org.apache.flex.html.staticControls.List.prototype.set_selectedItem =
-function(value) {
+  goog.base(this, 'addToParent', p);
 
-    var dp = this._dataProvider;
-    var n = dp.length;
-    for (var i = 0; i < n; i++)
-    {
-        if (dp[i] == value)
-            break;
-    }
-    if (i < n)
-        this.element.selectedIndex = i;
+  this.element.size = 5;
 };
-
-/**
- * @protected
- * @this {org.apache.flex.html.staticControls.List}
- * @return {Object} The selected item.
- */
-org.apache.flex.html.staticControls.List.prototype.changeHandler =
-function() {
-    var evt = this.createEvent('change');
-    this.dispatchEvent(evt);
-};
-

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
index 8953ce9..1df194f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
@@ -16,88 +16,102 @@ goog.provide('org.apache.flex.html.staticControls.RadioButton');
 
 goog.require('org.apache.flex.core.UIBase');
 
-var rbCount = 0;
+
 
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html.staticControls.RadioButton = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.RadioButton, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.RadioButton,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.addToParent = 
+org.apache.flex.html.staticControls.RadioButton.prototype.addToParent =
     function(p) {
-	this.element = document.createElement('label');
-	
-	var rb = document.createElement('input');
-	rb.type = 'radio';
-	this.element.appendChild(rb);
-	this.element.appendChild(document.createTextNode("radio button"));
+  var rb;
+
+  this.element = document.createElement('label');
 
-    p.appendChild(this.element);
+  rb = document.createElement('input');
+  rb.type = 'radio';
+  this.element.appendChild(rb);
+  this.element.appendChild(document.createTextNode('radio button'));
 
-    this.positioner = this.element;
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @return {string} The groupName getter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.get_groupName = function() {
-    return this.element.childNodes.item(0).name;
+org.apache.flex.html.staticControls.RadioButton.prototype.get_groupName =
+    function() {
+  return this.element.childNodes.item(0).name;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @param {string} value The groupName setter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.set_groupName = function(value) {
-    this.element.childNodes.item(0).name = value;
+org.apache.flex.html.staticControls.RadioButton.prototype.set_groupName =
+    function(value) {
+  this.element.childNodes.item(0).name = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @return {string} The text getter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.get_text = function() {
-    return this.element.childNodes.item(1).nodeValue;
+org.apache.flex.html.staticControls.RadioButton.prototype.get_text =
+    function() {
+  return this.element.childNodes.item(1).nodeValue;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @param {string} value The text setter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.set_text = function(value) {
-    this.element.childNodes.item(1).nodeValue = value;
+org.apache.flex.html.staticControls.RadioButton.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(1).nodeValue = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @return {bool} The selected getter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.get_selected = function() {
-    return this.element.childNodes.item(0).checked;
+org.apache.flex.html.staticControls.RadioButton.prototype.get_selected =
+    function() {
+  return this.element.childNodes.item(0).checked;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.RadioButton}
  * @param {bool} value The selected setter.
  */
-org.apache.flex.html.staticControls.RadioButton.prototype.set_selected = function(value) {
-    this.element.childNodes.item(0).checked = value;
+org.apache.flex.html.staticControls.RadioButton.prototype.set_selected =
+    function(value) {
+  this.element.childNodes.item(0).checked = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextArea.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextArea.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextArea.js
index 6ff9499..342ab25 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextArea.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextArea.js
@@ -16,45 +16,50 @@ goog.provide('org.apache.flex.html.staticControls.TextArea');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html.staticControls.TextArea = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.TextArea, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.TextArea,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html.staticControls.TextArea}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html.staticControls.TextArea.prototype.addToParent = 
+org.apache.flex.html.staticControls.TextArea.prototype.addToParent =
     function(p) {
-    this.element = document.createElement('textarea');
+  this.element = document.createElement('textarea');
 
-    p.appendChild(this.element);
+  p.appendChild(this.element);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.TextArea}
  * @return {string} The text getter.
  */
 org.apache.flex.html.staticControls.TextArea.prototype.get_text = function() {
-    return this.element.value
+  return this.element.value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.TextArea}
  * @param {string} value The text setter.
  */
-org.apache.flex.html.staticControls.TextArea.prototype.set_text = function(value) {
-    this.element.value = value;
+org.apache.flex.html.staticControls.TextArea.prototype.set_text =
+    function(value) {
+  this.element.value = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextButton.js
index 624ed48..7479328 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextButton.js
@@ -16,16 +16,18 @@ goog.provide('org.apache.flex.html.staticControls.TextButton');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html.staticControls.TextButton = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.TextButton, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.TextButton,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
@@ -34,23 +36,25 @@ goog.inherits(
  */
 org.apache.flex.html.staticControls.TextButton.prototype.addToParent =
     function(p) {
-    this.element = document.createElement('button');
-    this.element.setAttribute('type', 'button');
+  this.element = document.createElement('button');
+  this.element.setAttribute('type', 'button');
 
-    p.appendChild(this.element);
+  p.appendChild(this.element);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.TextButton}
  * @return {string} The text getter.
  */
 org.apache.flex.html.staticControls.TextButton.prototype.get_text = function() {
-    return this.element.innerHTML;
+  return this.element.innerHTML;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.TextButton}
@@ -58,5 +62,5 @@ org.apache.flex.html.staticControls.TextButton.prototype.get_text = function() {
  */
 org.apache.flex.html.staticControls.TextButton.prototype.set_text =
     function(value) {
-    this.element.innerHTML = value;
+  this.element.innerHTML = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
index 8945d93..f568e17 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/TextInput.js
@@ -16,46 +16,51 @@ goog.provide('org.apache.flex.html.staticControls.TextInput');
 
 goog.require('org.apache.flex.core.UIBase');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html.staticControls.TextInput = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html.staticControls.TextInput, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html.staticControls.TextInput,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html.staticControls.TextInput}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html.staticControls.TextInput.prototype.addToParent = 
+org.apache.flex.html.staticControls.TextInput.prototype.addToParent =
     function(p) {
-    this.element = document.createElement('input');
-    this.element.setAttribute('type', 'input');
+  this.element = document.createElement('input');
+  this.element.setAttribute('type', 'input');
 
-    p.appendChild(this.element);
+  p.appendChild(this.element);
 
-    this.positioner = this.element;
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.TextInput}
  * @return {string} The text getter.
  */
 org.apache.flex.html.staticControls.TextInput.prototype.get_text = function() {
-    return this.element.value
+  return this.element.value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html.staticControls.TextInput}
  * @param {string} value The text setter.
  */
-org.apache.flex.html.staticControls.TextInput.prototype.set_text = function(value) {
-    this.element.value = value;
+org.apache.flex.html.staticControls.TextInput.prototype.set_text =
+    function(value) {
+  this.element.value = value;
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7b74f50/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js
index aebd0ca..7fc70e3 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html5/staticControls/CheckBox.js
@@ -16,70 +16,79 @@ goog.provide('org.apache.flex.html5.staticControls.CheckBox');
 
 goog.require('org.apache.flex.core.UIBase');
 
-var cbCount = 0;
+
 
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.html5.staticControls.CheckBox = function() {
-    org.apache.flex.core.UIBase.call(this);
+  goog.base(this);
 };
-goog.inherits(
-    org.apache.flex.html5.staticControls.CheckBox, org.apache.flex.core.UIBase
-);
+goog.inherits(org.apache.flex.html5.staticControls.CheckBox,
+    org.apache.flex.core.UIBase);
+
 
 /**
  * @override
  * @this {org.apache.flex.html5.staticControls.CheckBox}
  * @param {Object} p The parent element.
  */
-org.apache.flex.html5.staticControls.CheckBox.prototype.addToParent = 
+org.apache.flex.html5.staticControls.CheckBox.prototype.addToParent =
     function(p) {
-	this.element = document.createElement('label');
-	
-	var cb = document.createElement('input');
-	cb.type = 'checkbox';
-	this.element.appendChild(cb);
-	this.element.appendChild(document.createTextNode("check box"));
-	
-    p.appendChild(this.element);
-
-    this.positioner = this.element;
+  var cb;
+
+  this.element = document.createElement('label');
+
+  cb = document.createElement('input');
+  cb.type = 'checkbox';
+  this.element.appendChild(cb);
+  this.element.appendChild(document.createTextNode('check box'));
+
+  p.appendChild(this.element);
+
+  this.positioner = this.element;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.CheckBox}
  * @return {string} The text getter.
  */
 org.apache.flex.html5.staticControls.CheckBox.prototype.get_text = function() {
-    return this.element.childNodes.item(1).nodeValue;
+  return this.element.childNodes.item(1).nodeValue;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.CheckBox}
  * @param {string} value The text setter.
  */
-org.apache.flex.html5.staticControls.CheckBox.prototype.set_text = function(value) {
-    this.element.childNodes.item(1).nodeValue = value;
+org.apache.flex.html5.staticControls.CheckBox.prototype.set_text =
+    function(value) {
+  this.element.childNodes.item(1).nodeValue = value;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.CheckBox}
  * @return {bool} The selected getter.
  */
-org.apache.flex.html5.staticControls.CheckBox.prototype.get_selected = function() {
-    return this.element.childNodes.item(0).checked;
+org.apache.flex.html5.staticControls.CheckBox.prototype.get_selected =
+    function() {
+  return this.element.childNodes.item(0).checked;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.html5.staticControls.CheckBox}
  * @param {bool} value The selected setter.
  */
-org.apache.flex.html5.staticControls.CheckBox.prototype.set_selected = function(value) {
-    this.element.childNodes.item(0).checked = value;
+org.apache.flex.html5.staticControls.CheckBox.prototype.set_selected =
+    function(value) {
+  this.element.childNodes.item(0).checked = value;
 };


[6/9] git commit: [flex-asjs] [refs/heads/develop] - Resolve merge conflicts

Posted by er...@apache.org.
Resolve merge conflicts

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 34b0f2762804b13d6b46336c954118b170423669
Parents: e07e28a
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Sat May 4 07:47:29 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Sat May 4 07:47:29 2013 +0200

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/UIBase.js   |   40 +++++++++++++++
 .../js/FlexJS/src/org/apache/flex/core/ViewBase.js |   32 ++++++------
 2 files changed, 56 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/34b0f276/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 1a77aef..5caa784 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -26,6 +26,12 @@ org.apache.flex.core.UIBase = function() {
   goog.base(this);
 
   /**
+   * @private
+   * @type {string}
+   */
+  this.lastDisplay;
+
+  /**
    * @protected
    * @type {Object}
    */
@@ -179,3 +185,37 @@ org.apache.flex.core.UIBase.prototype.set_model = function(value) {
   }
 };
 
+/**
+ * @expose
+ * @this {org.apache.flex.core.UIBase}
+ * @return {object} True if visible.
+ */
+org.apache.flex.core.UIBase.prototype.get_visible = function() {
+    return this.element.style.display != 'none';
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.UIBase}
+ * @param {object} value The new model.
+ */
+org.apache.flex.core.UIBase.prototype.set_visible = function(value) {
+    var oldValue = this.element.style.display != 'none';
+    if (value != oldValue)
+    {
+        if (!value)
+        {
+            this.lastDisplay = this.element.style.display;
+            this.element.style.display = 'none';
+            this.dispatchEvent(new org.apache.flex.events.Event('hide'));
+        }
+        else
+        {
+            if (this.lastDisplay)
+                this.element.style.display = this.lastDisplay;
+            else
+                this.element.style.display = 'block';
+            this.dispatchEvent(new org.apache.flex.events.Event('show'));
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/34b0f276/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 22eee24..087b381 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -14,56 +14,56 @@
 
 goog.provide('org.apache.flex.core.ViewBase');
 
-goog.require('org.apache.flex.FlexGlobal');
-
 goog.require('org.apache.flex.core.UIBase');
-
 goog.require('org.apache.flex.utils.MXMLDataInterpreter');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.core.ViewBase = function() {
-    org.apache.flex.core.UIBase.call(this);
-
-     /**
-      * @private
-      * @type {org.apache.flex.core.ViewBase}
-      */
-      this.currentObject_;
+  goog.base(this);
 };
 goog.inherits(org.apache.flex.core.ViewBase, org.apache.flex.core.UIBase);
 
+
 /**
  * @expose
  * @type {Object}
  */
 org.apache.flex.core.ViewBase.prototype.applicationModel;
 
+
 /**
  * @expose
  * @type {Array}
  */
 org.apache.flex.core.ViewBase.prototype.MXMLProperties;
 
+
 /**
  * @expose
  * @type {Array}
  */
 org.apache.flex.core.ViewBase.prototype.MXMLDescriptor;
 
+
 /**
  * @this {org.apache.flex.core.ViewBase}
  * @param {Object} model The model for this view.
  */
 org.apache.flex.core.ViewBase.prototype.initUI = function(model) {
-    this.applicationModel = model;
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
-            this.get_MXMLProperties());
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
-            this, this.get_MXMLDescriptor());
-    this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));
+  this.applicationModel = model;
+
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
+      this.get_MXMLProperties());
+
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
+      this, this.get_MXMLDescriptor());
+
+  this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));
 };
 
 /**


[4/9] git commit: [flex-asjs] [refs/heads/develop] - [FlexJS] minor git hickup?

Posted by er...@apache.org.
[FlexJS] minor git hickup?

This file shows a 'new', while it's been in the repo for ages...

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 26e97b2d914b1beb51edd08ef8a19999b287a9fa
Parents: b7b74f5
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Wed Apr 24 20:48:57 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Wed Apr 24 20:48:57 2013 +0200

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/UIBase.js   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26e97b2d/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 aaad59a..1a77aef 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -134,6 +134,7 @@ org.apache.flex.core.UIBase.prototype.get_className = function() {
     return this.className;
 };
 
+
 /**
  * @expose
  * @this {org.apache.flex.core.UIBase}
@@ -144,11 +145,11 @@ org.apache.flex.core.UIBase.prototype.set_className = function(value) {
     {
         this.element.className = value;
         this.className = value;
-        var evt = this.createEvent('classNameChanged');
-        this.dispatchEvent(evt);
+        this.dispatchEvent('classNameChanged');
     }
 };
 
+
 /**
  * @expose
  * @type {object}


[5/9] git commit: [flex-asjs] [refs/heads/develop] - Merge remote-tracking branch 'origin/goog.events' into develop

Posted by er...@apache.org.
Merge remote-tracking branch 'origin/goog.events' into develop

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>

Conflicts:
	frameworks/js/FlexJS/src/org/apache/flex/binding/ConstantBinding.js
	frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
	frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
	frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js


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

Branch: refs/heads/develop
Commit: e07e28a01374a505acb142e308da97b71fe5ac76
Parents: 9934402 26e97b2
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Sat May 4 07:45:17 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Sat May 4 07:45:17 2013 +0200

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/FlexGlobal.js    |   61 --
 .../js/FlexJS/src/org/apache/flex/FlexObject.js    |   26 -
 .../src/org/apache/flex/binding/BindingBase.js     |   78 ++
 .../src/org/apache/flex/binding/ConstantBinding.js |   59 +-
 .../src/org/apache/flex/binding/SimpleBinding.js   |   79 +--
 .../FlexJS/src/org/apache/flex/core/Application.js |   66 +--
 .../src/org/apache/flex/core/HTMLElementWrapper.js |  174 ++--
 .../FlexJS/src/org/apache/flex/core/IDocument.js   |   28 -
 .../js/FlexJS/src/org/apache/flex/core/ListBase.js |  185 ++++
 .../org/apache/flex/core/SimpleCSSValuesImpl.js    |    7 +-
 .../src/org/apache/flex/core/SimpleValuesImpl.js   |    7 +-
 .../js/FlexJS/src/org/apache/flex/core/UIBase.js   |  119 +--
 .../src/org/apache/flex/core/ValuesManager.js      |    8 +-
 .../src/org/apache/flex/events/CustomEvent.js      |   19 +-
 .../js/FlexJS/src/org/apache/flex/events/Event.js  |   22 +-
 .../src/org/apache/flex/events/EventDispatcher.js  |  100 +--
 .../apache/flex/html/staticControls/CheckBox.js    |   55 +-
 .../apache/flex/html/staticControls/ComboBox.js    |  307 +++----
 .../flex/html/staticControls/DropDownList.js       |  129 +---
 .../org/apache/flex/html/staticControls/Label.js   |   20 +-
 .../org/apache/flex/html/staticControls/List.js    |  124 +---
 .../apache/flex/html/staticControls/RadioButton.js |   66 +-
 .../apache/flex/html/staticControls/TextArea.js    |   27 +-
 .../apache/flex/html/staticControls/TextButton.js  |   24 +-
 .../apache/flex/html/staticControls/TextInput.js   |   29 +-
 .../apache/flex/html5/staticControls/CheckBox.js   |   55 +-
 .../apache/flex/html5/staticControls/ComboBox.js   |  306 +++----
 .../flex/html5/staticControls/DropDownList.js      |  129 +---
 .../org/apache/flex/html5/staticControls/Label.js  |   23 +-
 .../org/apache/flex/html5/staticControls/List.js   |  121 +---
 .../flex/html5/staticControls/RadioButton.js       |   66 +-
 .../apache/flex/html5/staticControls/TextArea.js   |   27 +-
 .../apache/flex/html5/staticControls/TextButton.js |   27 +-
 .../apache/flex/html5/staticControls/TextInput.js  |   29 +-
 .../src/org/apache/flex/jquery/Application.js      |   96 +--
 .../apache/flex/jquery/staticControls/CheckBox.js  |   72 +-
 .../flex/jquery/staticControls/RadioButton.js      |   68 +-
 .../flex/jquery/staticControls/TextButton.js       |   29 +-
 .../FlexJS/src/org/apache/flex/net/HTTPHeader.js   |   26 +-
 .../FlexJS/src/org/apache/flex/net/HTTPService.js  |  451 +++++------
 .../src/org/apache/flex/net/JSONInputParser.js     |    8 +-
 .../src/org/apache/flex/net/JSONItemConverter.js   |    9 +-
 .../flex/net/dataConverters/LazyCollection.js      |  159 ++--
 .../FlexJS/src/org/apache/flex/utils/IE8Utils.js   |  104 ---
 .../org/apache/flex/utils/MXMLDataInterpreter.js   |  675 ++++++++-------
 .../js/FlexJS/src/org/apache/flex/utils/Timer.js   |  126 ++--
 46 files changed, 1890 insertions(+), 2535 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e07e28a0/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
----------------------------------------------------------------------
diff --cc frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
index 27ab22e,1df194f..ece05d2
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/staticControls/RadioButton.js
@@@ -98,60 -111,7 +111,61 @@@ org.apache.flex.html.staticControls.Rad
   * @this {org.apache.flex.html.staticControls.RadioButton}
   * @param {bool} value The selected setter.
   */
- org.apache.flex.html.staticControls.RadioButton.prototype.set_selected = function(value) {
-     this.element.childNodes.item(0).checked = value;
+ org.apache.flex.html.staticControls.RadioButton.prototype.set_selected =
+     function(value) {
+   this.element.childNodes.item(0).checked = value;
  };
 +
 +/**
 + * @expose
 + * @this {org.apache.flex.html.staticControls.RadioButton}
 + * @return {Object} The value getter.
 + */
 +org.apache.flex.html.staticControls.RadioButton.prototype.get_value = function() {
 +    return this.element.childNodes.item(0).value;
 +};
 +
 +/**
 + * @expose
 + * @this {org.apache.flex.html.staticControls.RadioButton}
 + * @param {Object} value The value setter.
 + */
 +org.apache.flex.html.staticControls.RadioButton.prototype.set_value = function(value) {
 +    this.element.childNodes.item(0).value = value;
 +};
 +
 +/**
 + * @expose
 + * @this {org.apache.flex.html.staticControls.RadioButton}
 + * @return {Object} The value of the selected RadioButton.
 + */
 +org.apache.flex.html.staticControls.RadioButton.prototype.get_selectedValue = function() {
 +    var groupName = this.element.childNodes.item(0).name;
 +    var buttons = document.getElementsByName(groupName);
 +    var n = buttons.length;
 +    for (var i = 0; i < n; i++)
 +    {
 +        if (buttons[i].checked)
 +            return buttons[i].value;
 +    }
 +    return null;
 +};
 +
 +/**
 + * @expose
 + * @this {org.apache.flex.html.staticControls.RadioButton}
 + * @param {Object} value The value of the selected RadioButton.
 + */
 +org.apache.flex.html.staticControls.RadioButton.prototype.set_selectedValue = function(value) {
 +    var groupName = this.element.childNodes.item(0).name;
 +    var buttons = document.getElementsByName(groupName);
 +    var n = buttons.length;
 +    for (var i = 0; i < n; i++)
 +    {
 +        if (buttons[i].value == value)
 +        {
 +            buttons[i].checked = true;
 +            break;
 +        }
 +    }
 +};