1 // ========================================================================== 2 // Project: SC.Statechart - A Statechart Framework for SproutCore 3 // Copyright: ©2010, 2011 Michael Cohen, and contributors. 4 // Portions @2011 Apple Inc. All rights reserved. 5 // License: Licensed under MIT license (see license.js) 6 // ========================================================================== 7 8 /*globals SC */ 9 10 sc_require('system/state'); 11 12 /** 13 The default name given to an empty state 14 */ 15 SC.EMPTY_STATE_NAME = "__EMPTY_STATE__"; 16 17 /** 18 @class 19 20 Represents an empty state that gets assigned as a state's initial substate 21 if the state does not have an initial substate defined. 22 23 @extends SC.State 24 */ 25 SC.EmptyState = SC.State.extend(/** @scope SC.EmptyState.prototype */{ 26 27 name: SC.EMPTY_STATE_NAME, 28 29 enterState: function() { 30 var msg = "No initial substate was defined for state %@. Entering default empty state"; 31 this.stateLogWarning(msg.fmt(this.get('parentState'))); 32 } 33 34 }); 35