TIP 492: Introspection for 'tk busy'

Login
FlightAware bounty program for improvements to Tcl and certain Tcl packages.
Author:         Francois Vogel <fvogelnew1@free.fr>
State:          Final
Type:           Project
Vote:           Done
Created:        19-Dec-2017
Post-History:
Keywords:       tk busy
Tcl-Version:    8.7

Abstract

This TIP provides user access to the busy window that Tk uses to let a user think a widget is busy.

Rationale

The tk::busy documentation describes how a busy window is created to block events. The path of this busy window can be used to handle some events. This path is dependent on whether the widget to be covered is a toplevel or not, see implementation details here and also the man page for tk busy.

As a consequence, this logic needs to be known by any user of the tk busy command. Offering a way to get the path of the busy window would avoid this dependency on the implementation details.

Proposal

It is proposed to:

  1. Let the tk busy hold subcommand (and its shortcut tk busy) return the pathname of the busy window instead of the empty string.
  2. Provide a new subcommand tk busy busywindow to return that same information, or the empty string if the windows passed to it is currently not busy.
  3. Remove any mention of the details of the busy window naming from the man page.

Implementation

An implementation of this TIP can be found in the tip-492 branch.

Copyright

This document has been placed in the public domain.