Class: SC.HistoryState


Extends SC.Object.

Represents a history state that can be assigned to a SC.State object's initialSubstate property.

If a SC.HistoryState object is assigned to a state's initial substate, then after a state is entered the statechart will refer to the history state object to determine the next course of action. If the state has its historyState property assigned then the that state will be entered, otherwise the default state assigned to history state object will be entered.

An example of how to use:

stateA: SC.State.design({

initialSubstate: SC.HistoryState({
  defaultState: 'stateB'
}),

stateB: SC.State.design({ ... }),

stateC: SC.State.design({ ... })

})

Defined in: history_state.js

Field Summary

Instance Methods

Field Detail

defaultState String

The default state to enter if the parent state does not yet have its historyState property assigned to something other than null.

The value assigned to this property must be the name of an immediate substate that belongs to the parent state. The statechart will manage the property upon initialization.

isRecursive Boolean

Used to indicate if the statechart should recurse the history states after entering the this object's parent state

Instance Method Detail

state()

Used by the statechart during a state transition process.

Returns a state to enter based on whether the parent state has its historyState property assigned. If not then this object's assigned default state is returned.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:20 GMT-0600 (CST)