flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [9/9] git commit: [flex-asjs] [refs/heads/develop] - Final GJSLint and JSLint modifications/minor corrections
Date Sat, 04 May 2013 18:19:51 GMT
Final GJSLint and JSLint modifications/minor corrections

Signed-off-by: Erik de Bruin <erik@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 <erik@ixsoftware.nl>
Authored: Sat May 4 20:12:29 2013 +0200
Committer: Erik de Bruin <erik@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) {
 };
 


Mime
View raw message