Removing a Frame from a FrameSet

Removing a FrameFrame from a FrameSetFrameSet is straightforward and is performed using the astRemoveFrameastRemoveFrame function. You identify the Frame you wish to remove in the usual way, by giving its index within the FrameSet. For example, the following would remove the Frame with index 1:


\begin{terminalv}
astRemoveFrame( frameset, 1 );
\end{terminalv}

The only restriction is that you cannot remove the last remaining Frame because a FrameSet must always contain at least one Frame. When a Frame is removed, the Frames which follow it are re-numbered (i.e. their indices are reduced by one) so as to preserve the sequence of consecutive Frame indices. The FrameSet's NframeNframe attribute is also decremented.

If appropriate, astRemoveFrame will modify the FrameSet's BaseBase and/or CurrentCurrent attributes so that they continue to identify the same Frames as previously. If either the base or current Frame is removed, however, the corresponding attribute will become un-set, so that it reverts to its default value (ยง13.4) and therefore identifies an alternative Frame.

Note that it is quite permissible to remove any Frame from a FrameSet, even although other Frames may appear to depend on it. For example, in Figure 14, if Frame 1 were removed, the correct relationship between Frames 2 and 3 would still be preserved, although they would be re-numbered as Frames 1 and 2.