Repeater delay - each row - no local variable, no wait-fx

Hi! This works very smoothly, but it’s sort of scotch-taped together.

There’s a “listener” object inside of the repeater. Check out this post to see how a listener works, but basically when you trigger it by moving it (by 0,0), its code executes for each row in the repeater, just like Item Loaded does. It has this code:

On Moved (of listener in repeater)
  If value of label counter equals value [[item.index]]
    rotate rectangle by 90.

Outside of the repeater you have a dynamic panel with one more state than the repeater has rows. It’s OnPanelStateChange event handler has this code

OnPanelStateChange
  If state of this is not state1
    set text on counter to [[Target.text + 1]]
    move listener by (0,0)
    wait 300ms
    set panel This to state Next  // this triggers OnPanelStateChange

Finally, the button

OnClick
  set text of counter to 0 
  set state of dynamic panel to 1 // this won't trigger the listener because of the condition on the panel
  set state of panel to Next

Preview

File: repeater_delayed_animations.rp (65.7 KB)

3 Likes