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 23:45:04 UTC

git commit: [flex-asjs] [refs/heads/develop] - fix applicationModel getter in JS and improve getter/var with try catch block

Updated Branches:
  refs/heads/develop 993440296 -> 9de125f11


fix applicationModel getter in JS and improve getter/var with try catch block


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

Branch: refs/heads/develop
Commit: 9de125f11dcd8ab22ed8435b0dbbd6e61982a4e8
Parents: 9934402
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri May 3 23:44:53 2013 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri May 3 23:44:53 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9de125f1/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..26592c5 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,16 @@ 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)
+
+    try
     {
         this.source = this.document['get_' + this.sourceID]();
-    }
-    else
+    } 
+    catch(e)
     {
         this.source = this.document[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/9de125f1/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