op.go

Syntax op.go (direction, count)

Params direction is one of the following: down, up, left, right, flatup, flatdown. It indicates the direction in which cursor movement is to take place relative to the line on which the bar cursor is presently positioned.

count determines how many lines or levels to move in the indicated direction.

Action Moves the outline bar cursor in accordance with the direction and count parameters, as follows:

up - move cursor to previous sibling of the cursor heading

down - move cursor to next sibling of the cursor heading

left - move the cursor to parent of the cursor heading

right - move the cursor to the first subhead of the cursor heading

flatup - move the cursor to the previous expanded heading, regardless of level, as if outline were flattened at this point

flatdown - move the cursor to the next expanded heading, regardless of level, as if outline were flattened at this point

The movement indicated is repeated count times if possible.

Returns True unless unable to move cursor at all in the indicated direction. Note that if cursor can be moved fewer than count times, Frontier still returns true.

Examples In examples.Sample Outline 2, position the bar cursor on "Subhead 1, Summit." Now execute the following commands, in the order shown, and note the results indicated:
op.go (up, 1)


   » false // No previous sibling headings in the outline.

op.go (flatup, 25)

   » true

If the outline hierarchy were flat here, we could move up 1, so any movement produces a result of true.

op.go (down, 25)

   » false

No siblings below this one in the hierarchy, so no cursor movement possible.

op.go (right, infinity)

   » true

Cursor is on Subhead 1.1.1.1.1. Movement was six steps, but any movement produces a result of true.

op.go (down, 1)

   » false

No place to go down, so false is returned and cursor stays where it was.

op.go (flatdown, 1)

   » true

Acts as if hierarchy were flattened at this point.

Errors If movement is impossible as outlined above, Frontier returns false but it is not an error.

Notes This verb will only move to a heading that has been expanded. Collapsed headings are invisible and therefore not available to this verb.

Discuss