28.11 Listeners

The class Tk.listener is not a tcl object. Is main use is to serve as listener for events, see also Section 28.2.1. It provides the following methods. For an example see Section 5.6 of ``Window Programming in Mozart''.

tkInit

tkInit()

Creates a new listener, which consists of a message stream and a thread that serves each message on the stream by applying self to it.

tkServe

tkServe(+MessageR)

Adds the message MessageR to the current tail of the message stream.

tkClose

tkClose()

Decouples the message stream from the serving thread. That is, after all messages that are currently on the stream have been served, the serving thread terminates.


Denys Duchier, Leif Kornstaedt, Martin Homik, Tobias Müller, Christian Schulte and Peter Van Roy
Version 1.4.0 (20080702)