You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ca...@apache.org on 2013/05/03 03:11:42 UTC

git commit: [flex-asjs] [refs/heads/feature/applicationModel_refactor] - change applicationModel to support getter/setter and new the binding refactor in JS. This is not ready since SWFs now throws RTEs and does not work properly.

Updated Branches:
  refs/heads/feature/applicationModel_refactor [created] 23670a5a8


change applicationModel to support getter/setter and new the binding refactor in JS. This is not ready since SWFs now throws RTEs and does not work properly.


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

Branch: refs/heads/feature/applicationModel_refactor
Commit: 23670a5a87855a0dc187f1df5dbe65427d98ec2b
Parents: 355f113
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri May 3 03:11:19 2013 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri May 3 03:11:19 2013 +0200

----------------------------------------------------------------------
 frameworks/as/src/org/apache/flex/core/ViewBase.as |    9 ++-------
 .../src/org/apache/flex/createjs/core/ViewBase.as  |    9 ++-------
 .../src/org/apache/flex/binding/SimpleBinding.js   |    9 +--------
 .../src/org/apache/flex/createjs/core/ViewBase.js  |   14 +++++++++++++-
 4 files changed, 18 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23670a5a/frameworks/as/src/org/apache/flex/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/ViewBase.as b/frameworks/as/src/org/apache/flex/core/ViewBase.as
index f9b96f1..a1a628a 100644
--- a/frameworks/as/src/org/apache/flex/core/ViewBase.as
+++ b/frameworks/as/src/org/apache/flex/core/ViewBase.as
@@ -33,7 +33,7 @@ package org.apache.flex.core
 		
 		public function initUI(model:Object):void
 		{
-			_applicationModel = model;
+			applicationModel = model;
 			dispatchEvent(new Event("modelChanged"));
 			
 			// each MXML file can also have styles in fx:Style block
@@ -57,12 +57,7 @@ package org.apache.flex.core
 		
 		public var mxmlContent:Array;
 		
-		private var _applicationModel:Object;
-		
 		[Bindable("modelChanged")]
-		public function get applicationModel():Object
-		{
-			return _applicationModel;
-		}
+		public var applicationModel:Object;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23670a5a/frameworks/as/src/org/apache/flex/createjs/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/createjs/core/ViewBase.as b/frameworks/as/src/org/apache/flex/createjs/core/ViewBase.as
index 434d6dd..d0910e1 100644
--- a/frameworks/as/src/org/apache/flex/createjs/core/ViewBase.as
+++ b/frameworks/as/src/org/apache/flex/createjs/core/ViewBase.as
@@ -31,7 +31,7 @@ package org.apache.flex.createjs.core
 		
 		public function initUI(model:Object):void
 		{
-			_applicationModel = model;
+			applicationModel = model;
 			dispatchEvent(new Event("modelChanged"));
 			MXMLDataInterpreter.generateMXMLProperties(this, MXMLProperties);
 			MXMLDataInterpreter.generateMXMLInstances(this, this, MXMLDescriptor);
@@ -49,12 +49,7 @@ package org.apache.flex.createjs.core
 		
 		public var mxmlContent:Array;
 		
-		private var _applicationModel:Object;
-		
 		[Bindable("modelChanged")]
-		public function get applicationModel():Object
-		{
-			return _applicationModel;
-		}
+		public var applicationModel:Object;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23670a5a/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 5716599..88ef987 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/binding/SimpleBinding.js
@@ -86,14 +86,7 @@ org.apache.flex.binding.SimpleBinding.prototype.changeHandler = function() {
  */
 org.apache.flex.binding.SimpleBinding.prototype.set_strand = function(value) {
     this.destination = value;
-    if(this.document['get_' + this.sourceID] != undefined)
-    {
-        this.source = this.document['get_' + this.sourceID]();
-    }
-    else
-    {
-        this.source = this.document[this.sourceID];
-    }
+    this.source = this.document['get_' + this.sourceID]();
     this.source.addEventListener(
         this.eventName, org.apache.flex.FlexGlobal.createProxy(
             this, this.changeHandler

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23670a5a/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 03edf7f..b3dcd7a 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
@@ -39,7 +39,19 @@ goog.inherits(org.apache.flex.createjs.core.ViewBase, org.apache.flex.createjs.c
  * @expose
  * @type {Object}
  */
-org.apache.flex.createjs.core.ViewBase.prototype.applicationModel;
+org.apache.flex.createjs.core.ViewBase.prototype.get_applicationModel = function()
+{
+  return this.applicationModel;
+}
+
+/**
+ * @expose
+ * @type {Object}
+ */
+org.apache.flex.createjs.core.ViewBase.prototype.set_applicationModel = function(value)
+{
+  this.applicationModel = value;
+}
 
 /**
  * @expose