Command: poll

Syntax

poll { <window> ... }

Description

Initiate command polling from a macro.

Parameters

Switches

Notes

When polling is active, command processing within the currently executing macro is suspended and commands are subsequently read only from the keyboard (if enabled), visible windows or external events.

Polling can be terminated by the break command, or by the command repoll break when deep down inside a command frame hierarchy.

When input is restricted to one of more windows (a modal poll), polling will be automatically terminated if all these window are deleted. Any top-level windows created during the poll are automatically included in the polling list.

If a window has polling active, then its parent window automatically has polling active.

A window specifically set to have polling active will not have any child windows active unless
   a) the child windows are specifically indicated, or
   b) the -sub switch is present.

Examples

Create a window with subwindows.

window parwin = wpanel parwin {
    sub1: wpanel { button: 'Child One' }
    sub2: wpanel { button: 'Child Two' }
    button 'Parent Hit'
}

Enable all windows for input.

poll

Enable one subwindow (and its parent).

poll parwin.sub1

Enable the parent window and both subwindows (2 different methods).

poll parwin.sub1, parwin.sub2
poll parwin,-sub

Enable only the parent window (no subwindows).

poll parwin

See Also

Commands:

break, repoll