'\" '\" Copyright 1990-1992 Regents of the University of California '\" Permission to use, copy, modify, and distribute this '\" documentation for any purpose and without fee is hereby '\" granted, provided that this notice appears in all copies. '\" The University of California makes no representations about '\" the suitability of this material for any purpose. It is '\" provided "as is" without express or implied warranty. '\" '\" $Header: /a/cvs/386BSD/ports/tk/doc/update.n,v 1.1.1.1 1993/08/09 01:21:07 jkh Exp $ SPRITE (Berkeley) '/" .so man.macros .HS update cmds .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME .VS update \- Process pending events and/or when-idle handlers .SH SYNOPSIS \fBupdate\fR ?\fBidletasks\fR? .VE .BE .SH DESCRIPTION .PP This command is used to bring the entire application world ``up to date.'' It flushes all pending output to the display, waits for the server to process that output and return errors or events, handles all pending events of any sort (including when-idle handlers), and repeats this set of operations until there are no pending events, no pending when-idle handlers, no pending output to the server, and no operations still outstanding at the server. .PP If the \fBidletasks\fR keyword is specified as an argument to the .VS command, then no new events or errors are processed; only when-idle idlers are invoked. This causes operations that are normally deferred, such as display updates and window layout calculations, to be performed immediately. .PP The \fBupdate idletasks\fR command is useful in scripts where changes have been made to the application's state and you want those changes to appear on the display immediately, rather than waiting for the script to complete. The \fBupdate\fR command with no options is useful in scripts where you are performing a long-running computation but you still want the application to respond to user interactions; if you occasionally call \fBupdate\fR then user input will be processed during the next call to \fBupdate\fR. .VE .SH KEYWORDS event, flush, handler, idle, update