You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/10/19 11:31:21 UTC

[3/3] git commit: [flex-asjs] [refs/heads/develop] - Add initialStateHandler_ method and corresponding event

Add initialStateHandler_ method and corresponding event


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

Branch: refs/heads/develop
Commit: 38f906b838cf8d22ce5a20079e7ad47bfbc69b41
Parents: 31d586d
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Sun Oct 19 02:29:56 2014 -0700
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Sun Oct 19 02:29:56 2014 -0700

----------------------------------------------------------------------
 .../FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js   | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/38f906b8/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 eb6d243..cfe550d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -67,10 +67,20 @@ org.apache.flex.core.SimpleStatesImpl.prototype.set_strand =
     if (this.strand_.addEventListener) {
       this.strand_.addEventListener('currentStateChanged',
           goog.bind(this.stateChangeHandler_, this));
+	  this.strand_.addEventListener('initComplete',
+          goog.bind(this.initialStateHandler_, this));	  
     }
   }
 };
 
+/**
+ * @private
+ * @param {Object} event The event.
+ */
+org.apache.flex.core.SimpleStatesImpl.prototype.initialStateHandler_ =
+    function(event) {
+    this.dispatchEvent(new org.apache.flex.events.ValueChangeEvent('currentStateChanged', null, this.strand_.get_currentState()));
+};
 
 /**
  * @private