view
v
replace
row
count
w
=> view
|
v
|
|
input view
|
|
row
|
|
row position
|
|
count
|
|
row count
|
|
w
|
|
rows to be inserted
|
Replace takes an input view and returns one with count rows
starting at row replaced by the contents of w.
The views v and w must have the same structure.
Replace is used internally to implement {append}, {insert}, and {delete}.
Examples:
set v [view {A B} def {a b c d e f g h i j}]
set w [view {A B} def {x y xx yy}]
view $v replace 1 0 $w
| A | B |
| 0 | a | b |
| 1 | x | y |
| 2 | xx | yy |
| 3 | c | d |
| 4 | e | f |
| 5 | g | h |
| 6 | i | j |
view $v replace 1 1 $w
| A | B |
| 0 | a | b |
| 1 | x | y |
| 2 | xx | yy |
| 3 | e | f |
| 4 | g | h |
| 5 | i | j |
view $v replace 1 2 $w
view $v replace 1 3 $w