flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [2/9] [FlexJS] initial commit of 'goog.events' refactoring
Date Sat, 04 May 2013 18:19:44 GMT
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'
-};
-


Mime
View raw message