Index: openacs-4/packages/xowiki/tcl/repeat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/repeat-procs.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/xowiki/tcl/repeat-procs.tcl 13 Oct 2013 18:13:58 -0000 1.2.2.1 +++ openacs-4/packages/xowiki/tcl/repeat-procs.tcl 7 Nov 2013 19:43:54 -0000 1.2.2.2 @@ -114,11 +114,31 @@ } } - #repeatContainer instproc convert_to_internal {} { - # next - # my msg name=[my name],value=[my get_compound_value] - #} + repeatContainer instproc convert_to_internal {} { + set values [my value] + my trim_values + set r [next] + #my msg name=[my name],value=[my get_compound_value] + # + # remove "unneeded" entries from instance attributes + # + [my object] instvar instance_attributes + foreach {name value} $values { + if {[dict exists $instance_attributes $name]} { + dict unset instance_attributes $name + } + } + return $r + } + + repeatContainer instproc trim_values {} { + # Trim trailing values idential to default. + # Trimming the components list seems sufficient. + set count [my count_values [my value]] + my set components [lrange [my components] 0 $count] + } + repeatContainer instproc count_values {values} { set count 1 set highestCount 1