Event Loop Moves from Tk to Tcl

To support network sockets, the event loop was moved from Tk to Tcl. This means that the after and update commands are now part of Tcl. The fileevent command was added to support non-blocking I/O. The vwait command was added to Tcl, and this is equivalent to the tkwait variable command. Event-driven I/O is described in Chapter 16 starting on page 217.

The tkerror command has been replaced by bgerror. This is the procedure that is called when an error occurs while processing an event. Backwards compatibility is provided if you already define tkerror. These procedures are described on page 190.

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.