etgryphon/stativus — Issue #31: Question: should events always trigger state transition?
Author: johnnywengluu
Created: 2011-11-22 21:06:48+00:00
State: open

After reading some texts it seems that an event should always trigger a state transition. Is this correct?

Eg. if I wanan display something when someone has pressed a button, instead of placing the code in the event handler, I place it in enterState() in the state transitioned to? Is this better to placing things in event handlers directly?

How do I know when to place logic in event handlers and when to place it in states (enterState)?