diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:52:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:52:31 (GMT) |
commit | 5bc57d7b0f63d86fc383565d69f7704943fff94d (patch) | |
tree | 3ed6ba33b7a0eb1bb7d89c83f86bb2f420d5284a /doc/fileevent.n | |
parent | 7ea5d4dbe8b82a86701cec95132a8a9557a5f105 (diff) | |
download | tcl-5bc57d7b0f63d86fc383565d69f7704943fff94d.zip tcl-5bc57d7b0f63d86fc383565d69f7704943fff94d.tar.gz tcl-5bc57d7b0f63d86fc383565d69f7704943fff94d.tar.bz2 |
More doc fix backporting
Diffstat (limited to 'doc/fileevent.n')
-rw-r--r-- | doc/fileevent.n | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/doc/fileevent.n b/doc/fileevent.n index 8e82564..73f2104 100644 --- a/doc/fileevent.n +++ b/doc/fileevent.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fileevent.n,v 1.5 2001/09/27 05:50:56 andreas_kupries Exp $ +'\" RCS: @(#) $Id: fileevent.n,v 1.5.6.1 2004/10/27 12:52:40 dkf Exp $ '\" .so man.macros .TH fileevent n 7.5 Tcl "Tcl Built-In Commands" @@ -100,21 +100,18 @@ If an error occurs while executing the script then the In addition, the file event handler is deleted if it ever returns an error; this is done in order to prevent infinite loops due to buggy handlers. - .SH EXAMPLE -.PP +In this setup \fBGetData\fR will be called with the channel as an +argument whenever $chan becomes readable. .CS - proc GetData {chan} { +proc GetData {chan} { if {![eof $chan]} { puts [gets $chan] } - } - - fileevent $chan readable [list GetData $chan] +} +\fBfileevent\fR $chan readable [list GetData $chan] .CE -In this setup \fBGetData\fR will be called with the channel as an -argument whenever $chan becomes readable. .SH CREDITS .PP |