Re: History transition executable content - when is it executed?

Ate Douma <[email protected]>
Newsgroups gmane.comp.web.voice
Message-ID <[email protected]>
For the record, I just saw I made a mistake in the proposal for modifying the 
addDescendantStatesToEnter procedure.

I'm sure everyone else already noticed, but just to make sure:

The recording of the History transition in the default 
defaultHistoryTransitionOnEntry table of course should only be done when there 
is NO history recorded yet, not the opposite :)

So, the pseudo-algorithm for addDescendantStatesToEnter procedure could become 
something like:

   procedure 
addDescendantStatesToEnter(state,statesToEnter,statesForDefaultEntry, 
defaultHistoryTransitionOnEntry):
       if isHistoryState(state):
           if historyValue[state.id]:
               for s in historyValue[state.id]:
                   addDescendantStatesToEnter(s,statesToEnter,statesForDefaultEntry)
                   addAncestorStatesToEnter(s, state.parent, statesToEnter, 
statesForDefaultEntry)
           else:
               // track this targeted History its transition on its parent state 
id for processing in enterStates() after entering its parent
               defaultHistoryTransitionOnEntry[state.parent.id] = state.transition
       ....

instead of my erroneous earlier example.


Regards,
Ate
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.