Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.x, 2.x
    • Component/s: GenericTools
    • Labels:
      None
    • Environment:
      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

        Activity

        Hide
        nbubna Nathan Bubna added a comment -

        Ok, i've mostly fixed these problems. I believe there are still some issues with last synced items in outer watched and synced loops when an inner loop has finished rendering, but i don't know that there's any reasonable way to fix those, at least not without undesirable side-effects. The reality is that LoopTool is attempting some fairly audacious stuff for a tool and can only support a certain level of complexity.

        So all reading this who wish to do complex nesting, watching and syncing with LoopTool had best push their insanity out of their templates. Or ask me and i'll tell you some even... uh... "loopier" in-template solutions that just occured to me.

        Show
        nbubna Nathan Bubna added a comment - Ok, i've mostly fixed these problems. I believe there are still some issues with last synced items in outer watched and synced loops when an inner loop has finished rendering, but i don't know that there's any reasonable way to fix those, at least not without undesirable side-effects. The reality is that LoopTool is attempting some fairly audacious stuff for a tool and can only support a certain level of complexity. So all reading this who wish to do complex nesting, watching and syncing with LoopTool had best push their insanity out of their templates. Or ask me and i'll tell you some even... uh... "loopier" in-template solutions that just occured to me.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development