Robami / pystatecharts

Automatically exported from code.google.com/p/pystatecharts
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

end from hierarchical state #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am attempting to auto-generate a statechart from an ini file
listing states and transitions.
The tictactoe game is my starting point.
From the Help hierarchical state (of tictactoe) one can quit the game, but
you do this by trick (sending the exit event).
When I try to do this cleanly by creating a call to Transition from
helpState to end_state, I get this error from pseudostates.py:

class EndState(PseudoState):
    def __init__(self, context):
        PseudoState.__init__(self, context)
        assert isinstance(self.context, Statechart),\
                "Currently the end state is allowed in only in Statechart" 

Why is this illegal?    
If I removed this assertion, what would be the side-effects?

Original issue reported on code.google.com by r...@haystack.mit.edu on 16 Nov 2010 at 9:23

GoogleCodeExporter commented 8 years ago
This is just a design choice and a preferred one. 

Original comment by vish...@gmail.com on 3 Dec 2010 at 11:02

GoogleCodeExporter commented 8 years ago

Original comment by vish...@gmail.com on 14 Apr 2011 at 6:35