Uploaded image for project: 'Velocity Tools'
  1. Velocity Tools
  2. VELTOOLS-128

LoopTool doesn't sync correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0.x, 2.x, 3.0
    • GenericTools
    • None
    • Velocity Tools 2.0, Velocity Engine 1.6.4

    Description

      When using LoopTool, it doesn't appear to sync correctly, starting "one in" on the second list, and also missing the last value from the second list.

      Running the example from the documentation, without the stop():

      #set( $list = [1..7] )
      #set( $others = [3..10] )
      #foreach( $item in $loop.watch($list).sync($others, 'other') )
      $item -> $loop.other
      #end

      produces:
      1 -> 4
      2 -> 5
      3 -> 6
      4 -> 7
      5 -> 8
      6 -> 9
      7 -> $loop.other

      Attachments

        Activity

          People

            Unassigned Unassigned
            iain miller Iain Miller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: