mriehl/fysom — pull request #19 by mattjml (2014-12-07 23:15:19+00:00)
Title: Support for reflexive transition callbacks

Hi,

I added a new type of callback 'called onreenter_event' to handle
reflexive transitions (where src == dst). I used fysom recently and
ended up adding this functionality as as I felt it was missing.

Admittedly there are other ways to trigger callbacks on reflexive
transitions, but these seemed less clear and more 'hacky'. Feel
free to ask me questions and query anything!

Cheers,
Matt

Commit message below:

"Added onreenter_event callback functionality to handle reflexive
transitions (when source and destination event are the same) in a
concise manner.

This avoids using:
- on event callbacks with conditional branches based on src and dst
dst state
- specific (and potentially duplicate) events for single reflexive
transitions"