I solve this problem by combining the event structure with a classical state machine. The classical state machine is a case inside a loop with either an enum or string shift register defining the actual state. In the idle case of that structure is the actual event structure which handles the UI.
Whenever I need to trigger a specific action which could happen from multiple locations I actually place the handling code in a specific case in the outside state machine and just wire from the actual event case the according state out to the shift register.
This architecture allows for a very flexible and extende state machine programming with the event structure doing all the UI event handling and the state machine doing the more involved actions or series of actions
.
Rolf K
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390