beetlebug▾
/

tk busy

Marks a window as busy, and gives the busy windows.

tk busy WINDOW ?-option VALUE ...?
tk busy hold WINDOW ?-option VALUE ...?
tk busy forget WINDOW
tk busy status WINDOW
tk busy current ?PATTERN?
tk busy cget WINDOW OPTION
tk busy configure WINDOW ?OPTION VALUE ...?

Description

hold marks WINDOW as busy, and tk busy WINDOW is the same. forget removes the mark. status gives 1 for a busy window and 0 for another. current gives the busy windows whose path matches the glob PATTERN, each window by default.

In ztk the mark is a state for scripts only. A busy window and its children still get the input of the user, and the pointer keeps its cursor. cget and configure accept their words and give an empty string.

Returns

1 or 0 for status, a list of windows for current, and else an empty string.

Examples

% frame .work
> tk busy hold .work
> list [tk busy status .work] [tk busy current]
1 .work

% frame .w2
> tk busy .w2
> tk busy forget .w2
> tk busy status .w2
0

Errors

% tk busy stop .
unknown or ambiguous subcommand "stop": must be cget, configure, current, forget, hold, or status
-errorcode NONE

Differences from Tcl

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1