flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [04/28] git commit: [flex-asjs] [refs/heads/develop] - use currentStateChange as in AS
Date Tue, 23 Dec 2014 07:41:27 GMT
use currentStateChange as in AS


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

Branch: refs/heads/develop
Commit: dd57f20d7369feaae00e1fd38b9e0bb0ee5dbcb9
Parents: c163ef1
Author: Alex Harui <aharui@apache.org>
Authored: Wed Dec 17 14:41:35 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Wed Dec 17 14:41:35 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js   | 3 +++
 .../js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js       | 4 ++--
 frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js        | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd57f20d/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index 643cd29..784645d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -168,7 +168,10 @@ org.apache.flex.core.ContainerBase.prototype.get_currentState = function()
{
  * @param {String} s The current state.
  */
 org.apache.flex.core.ContainerBase.prototype.set_currentState = function(s) {
+  var event = new org.apache.flex.events.ValueChangeEvent(
+      'currentStateChange', false, false, this.currentState_, s);
   this.currentState_ = s;
+  this.dispatchEvent(event);
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd57f20d/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
index 79646a1..88cf053 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -66,7 +66,7 @@ org.apache.flex.core.SimpleStatesImpl.prototype.set_strand =
   if (this.strand_ !== value) {
     this.strand_ = value;
     if (this.strand_.addEventListener) {
-      this.strand_.addEventListener('currentStateChanged',
+      this.strand_.addEventListener('currentStateChange',
           goog.bind(this.stateChangeHandler_, this));
       this.strand_.addEventListener('initComplete',
           goog.bind(this.initialStateHandler_, this));
@@ -85,7 +85,7 @@ org.apache.flex.core.SimpleStatesImpl.prototype.initialStateHandler_ =
      *  @type {Object}
     **/
     var host = this.strand_;
-    this.dispatchEvent(new org.apache.flex.events.ValueChangeEvent('currentStateChanged',
+    this.dispatchEvent(new org.apache.flex.events.ValueChangeEvent('currentStateChange',
         false, false, null,
         host.get_currentState()));
   };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd57f20d/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 1c0029a..1530ac1 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -216,7 +216,7 @@ org.apache.flex.core.ViewBase.prototype.get_currentState = function()
{
  */
 org.apache.flex.core.ViewBase.prototype.set_currentState = function(value) {
   var event = new org.apache.flex.events.ValueChangeEvent(
-      'currentStateChanged', false, false, this.currentState_, value);
+      'currentStateChange', false, false, this.currentState_, value);
   this.currentState_ = value;
   this.dispatchEvent(event);
 };


Mime
View raw message