|
2010-03-04
| ||
| 02:52 | • Ticket [2962834fff] Bugfixes in tutorial examples status still Open with 1 o... artifact: d46c2c8dda user: andreas_kupries | |
| 02:45 | • Add attachment tutorial-changes.diff-wu to ticket [2962834fffffffff|296... artifact: 63b65ca9e6 user: andreas_kupries | |
| 02:45 | • Ticket [2962834fff] Bugfixes in examples status still Open with 4 other chan... artifact: 13c9b73678 user: andreas_kupries | |
|
2010-03-03
| ||
| 19:45 | • New ticket [2962834fff]. artifact: ed177ca262 user: andreas_kupries | |
Bugfixes in tutorial examples
Open2962834fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-03-03 19:45:56
This is based on the discussion at
http://community.activestate.com/forum/trouble-activetcl-85-and-tutorial
Attached a patch fixing syntax errors in the examples of lesson 25.
The patch also contains a change to the example in lesson 26a, this however is more arguable. It depends on if the tutorial is target at Tcl 8.5 or 8.4. One easy trick to handle stuff like this would be to write the proper 'package require Tcl 8.x' in the examples.
The echo server in lesson 40 has some problems ... No patch for that as I saw the reference to it in the discussion only today, when I was writing up this note. I note:
(1) The channels are not configured -blocking 0
(2) gets returning < 0 is treated as EOF. That is wrong.
gets can return < 0 when the data received so far is not a complete line yet (fblocked!).
gets < 0 => abort event handling.
Handle eof explicitly before that, by checking with [eof ...].
Wiki page http://wiki.tcl.tk/14071 has a larger example, albeit even that has bug (1).
andreas_kupriesplain2010-03-04 02:45:56
File Added - 365299: tutorial-changes.diff-wu
andreas_kupries Ticket [2962834fff]: 1 change
[History diff]2010-03-04 02:52:09
Log in (anonymous is fine) to add a comment.
Attachments:
- tutorial-changes.diff-wu [download] added by andreas_kupries on 2010-03-04 02:45:56. [details]