Re: TokenMoveFrom event send twice during Scene destruction

Andreas Kraft (kraft@fokus.gmd.de)
Mon, 23 Nov 1998 14:18:05 +0100 ((MEZ) Mitteleurop. Zeit)

Dear colleagues,

On Fri, 20 Nov 1998, Stephane ALLIZON wrote:
> Yes, you are completely right.
> I suggest the same modification to avoid this problem.

I think the behaviour as it is described in the IS and the DCOR1 is correct.
The Deactivation behaviour of the TokenGroup is only executed once during
the Deactivation or Destruction of a Scene. Let me summarise the single steps
of the Deactivation of a Scene including one TokenGroup Object:

e.g. TransitionTo:
o Scene(Deactivation)
o Group(Deactivation) - Deactivate all active Ingredients
o TokenGroup(Deactivation)
(1) o Event(TokenMovedFrom)
(2) o Root(Deactivation) - RunningStatus(false)
o Root(Deactivation)
o Scene(Destruction)
o Group(Destruction) - Destruct all Ingredients
o TokenGroup(Destruction)
(3) o Root(Destruction)
o Root(Destruction)

(1) Here, the TokenMovedFrom event is raised.
(2) Here, the RunningStatus of the TokenGroup is set to false, i.e. deactivate
the object.
(3) Here the Destruction behaviour from the Root class is executed. The
Deactivation behaviour is not executed again because step 2) of the
behaviour is defined as follows:
2. If the RunningStatus attribute of the object is True,
a) apply the Deactivation behaviour.
b) wait for an IsStopped event from the object.
This shall all be done synchronously.
So, as the RunningStatus of the TokenGroup has already been set to "false"
in (2), the Deactivation behaviour is not been executed again.

Best regards,

Andreas

-- 
  o  _     Andreas Kraft
 (\_|_)      GMD FOKUS, kraft@fokus.gmd.de, +49 30 3463-7232
 T> ] [        The sky is the limit