UserLand Software Home  |  Manila  |  Radio  |  Support  |  News

DocServer

Prev | Next | Wp Verbs > wp.getDisplay

wp.getDisplay

Syntax wp.getDisplay ()

Params None required

Action Determines whether the outline's present display mode is true or false. When it is true, the user can see all changes being made on the screen; when it is false, the screen is "frozen" and the user cannot see any changes being made in the outline. Used in

conjunction with wp.setDisplay, this verb enables you to hide details of outline operations from your user.

Returns The boolean value of the screen's display mode, where true means the user can see changes as they are made, false means that the user cannot see changes being made.

Examples This example isn't particularly interesting, but it demonstrates what wp.getDisplay does. In examples.Sample Outline 1, position the cursor on "Subhead 3, Summit 2" and then execute:
originalSetting = wp.getDisplay ();

wp.setDisplay (false);

startPoint = op.getCursor ();

op.go (flatup, 1);

msg (op.getLineText ());

clock.waitSeconds (2);

op.go (flatup, 1);

msg (op.getLineText ());

clock.waitSeconds (2);

op.setCursor (startPoint);

wp.setDisplay (originalSetting)

You know that the cursor has moved up two positions in the outline but you won't see it happen because the first line of the script above freezes the screen so you don"t see updates. But you"ll see the text of those lines in Frontier"s main window, so you
know the cursor moved.

Notes You may wonder why you can't just use wp.setDisplay (false) at the beginning of such an operation and wp.setDisplay (true) at the end. If you did this and then called this verb from another one that turned the display on and then back off, you'd end up

with a confusing situation. It is always better to save the current state of the screen display and then set it to where you want it, restoring it when you are finished.

In general, you use wp.getDisplay and wp.setDisplay before and after an operation or set of operations that will result in the outline's display being changed, in cases where you either want the user to see only the finished result, or where you are

going to return the outline to its original state and don't want the user to notice that anything is happening to the outline.

See Also wp.setDisplay

op.getCursor

op.setCursor

Prev | Next | Wp Verbs > wp.getDisplay

Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X