[previous] [up] [next]     [contents] [index]
Next: write Up: wx:snip Previous: size-cache-invalid

split

Splits the snip into two snips. This is called when a snip has more than one item and something is inserted between two items.

The arguments are a position integer and two boxes. The position integer specifies how many items should be given to the new first snip; the rest go to the new second snip. The two boxes must be filled with two new snips. (The old snip is no longer used, so it can be recycled as a new snip.)

If the returned snips do not have the expected counts, their counts are forcibly modified. If either returned snip is already owned by a another administrator, a surrogate snip is created.

The snip's buffer is usually internally locked for reading when this method is called (see also Locks).



PLT