Ejemplo n.º 1
0
    def __init__(self, mp):
        self.mainPres = mp

        #This is a slightly convoluted way to avoid importing StartState
        self.currentState = State().next(State.EVENTS.START)()
        self.currentState.run(self.mainPres)

        #Set the StateMachine based on the dataModel of the mainPres
        self.changeState(self.mainPres.getModeTransition())