|
2001-04-19
| ||
| 04:40 | • Ticket [218375ffff] Fileevent never executes in tclsh82 - works in wish82 st... artifact: 2a25a8fda5 user: dgp | |
|
2000-10-26
| ||
| 08:20 | • Closed ticket [218375ffff]. artifact: 4a6a330e3b user: welch | |
| 00:56 | • New ticket [218375ffff]. artifact: 1ffd9519c6 user: nobody | |
Fileevent never executes in tclsh82 - works in wish82
Closed / Invalid218375ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:56:50
OriginalBugID: 4314 Bug
Version: 8.2.2
SubmitDate: '2000-03-06'
LastModified: '2000-03-10'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: ericm
OS: Windows 95
FixedDate: '2000-10-25'
ClosedDate: '2000-03-10'
Name:
David Graczyk
ReproducibleScript:
The following script works in wish82 but not in tclsh82.
catch {set channelID [open COM2: r+]}
if {[info vars channelID] == ""} {
return
}
fconfigure $channelID -buffering line -mode 9600,N,8,1 -blocking 0
# COM2 is connected to a modem.
# I call the moden line and observe
# the RING message from the modem.
fileevent $channelID readable {
puts [read $channelID]
}
ObservedBehavior:
The fileevent never executes in tclsh82.
DesiredBehavior:
I would expect tclsh to work as wish does.
One key difference between wish and tclsh is that wish always starts an event loop, while tclsh normally does not. Because fileevents depend on an event loop to function, they will not work correctly in tclsh unless you takes steps to enable the event loop. Usually this is accomplished through the use of the "vwait" command. Try adding
vwait forever
to the end of your script. This will enable the event loop, and your fileevents should then be processed as you expect. See the manual page for vwait for more information.
- eric
-- 03/10/2000 ericm
welch Closed ticket [218375ffff].
[History diff]2000-10-26 08:20:09
dgp Ticket [218375ffff]: 4 changes
[History diff]2001-04-19 04:40:42
Log in (anonymous is fine) to add a comment.