I have a StateManger with an initialState which has an enter() method.
If I wan to transition to another state from this method, the StateManager instance is left screwed up and next time is send() a signal of the target state, I get
TATEMANAGER: Unhandled event 'authenticate' being sent to state (null).
I don't think that the state should be 'null' in a FSM implementation... this is catually
an illegal state.
Implement a redirect method in your route and transition from there instead.
Is this advice also true if I'm not talking about a router here? My use-case is a State Manger which is used as a controller.
I usually put my transitionTo within an Ember.run.next.
The reason this is an issue is that enter is called as part of the transition process, so delaying until the next run loop allows the state manager to finishing transitioning before starting the next transition.
@lukemelia , Yes! Em.run.next() did the trick.
I also can comprehend your explanation.