Created
September 9, 2010 20:09
-
-
Save ColinCampbell/572459 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 12f045ea50d51ed886d7fe0d439d3fad2abac498 Mon Sep 17 00:00:00 2001 | |
| From: Colin Campbell <[email protected]> | |
| Date: Thu, 9 Sep 2010 16:07:48 -0400 | |
| Subject: [PATCH] Fixed enterState being called before state is considered entered | |
| --- | |
| frameworks/foundation/system/statechart.js | 10 +++++----- | |
| 1 files changed, 5 insertions(+), 5 deletions(-) | |
| diff --git a/frameworks/foundation/system/statechart.js b/frameworks/foundation/system/statechart.js | |
| index 1658c25..b59af6f 100644 | |
| --- a/frameworks/foundation/system/statechart.js | |
| +++ b/frameworks/foundation/system/statechart.js | |
| @@ -542,11 +542,6 @@ Ki.StatechartManager = { | |
| var parentState = state.get('parentState'); | |
| if (parentState && !state.get('isConcurrentState')) parentState.set('historyState', state); | |
| - if (this.get('trace')) SC.Logger.info('entering state: ' + state); | |
| - var result = this.enterState(state); | |
| - | |
| - if (this.get('monitorIsActive')) this.get('monitor').pushEnteredState(state); | |
| - | |
| if (current) { | |
| parentState = state; | |
| while (parentState) { | |
| @@ -555,6 +550,11 @@ Ki.StatechartManager = { | |
| } | |
| } | |
| + if (this.get('trace')) SC.Logger.info('entering state: ' + state); | |
| + var result = this.enterState(state); | |
| + | |
| + if (this.get('monitorIsActive')) this.get('monitor').pushEnteredState(state); | |
| + | |
| return result; | |
| }, | |
| -- | |
| 1.7.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment