Rahul,

I have a strange behavior with one of my samples I'm currently playing with.
I try generate a number of timer events (like a count down) using a variable
in the data model and delayed events:

<datamodel>
   <data name="timer" expr = "'5'"/>
</datamodel>

<state id="welcome">
   <onentry>
       <!-- start timer -->
       <assign name="timer" expr="timer - 1"/>
       <send event="timer" delay="1s"/>
   </onentry>

   <transition event="timer" cond="timer > 0">
       <assign name="timer" expr="timer - 1"/>
       <send event="timer" delay="1s"/>
       <!-- do something -->
   </transition>

   <transition event="timer" cond="timer == 0" target="somewhere"/>
</state>

This sample does not work as expected. All events are fired immediately and
are not delayed. As soon as I rename either the event name or the name of
the data tag to "timer1" it works fine. As soon as I use a dotted name for
the data tag name attribute (e.g. "timer.id" while event="timer") it doesn't
work again.

I have no clue why the data model names and the event names should
be related. Is this intended?

I'm using snapshot 0.7

-Ingmar.

Reply via email to