Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-04-05
00:32 • Closed ticket [1910136fff]: Misleading remark in vwait manpage plus 7 other ... artifact: 326f3b8677 user: dkf
00:32 • Ticket [1910136fff]: 4 changes artifact: 17d4fe0ade user: dkf
2008-03-08
23:35 • Ticket [1910136fff]: 4 changes artifact: fdcb492e38 user: ferrieux
16:13 • New ticket [1910136fff]. artifact: bdf64e119e user: sbron

Misleading remark in vwait manpage

Closed / Fixed1910136fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 18 years ago
Descriptionplain2008-03-08 16:13:12
The vwait manual page claims that "varName must be globally scoped (either with a call to global for the varName, or with the full namespace path specification)."

The opposite turns out to be the case. varName is always interpreted as global even if it hasn't been specified with the full namespace path and hasn't been globally scoped with a call to global.
ferrieuxplain2008-03-08 23:35:17
Logged In: YES 
user_id=496139
Originator: NO

Well, it *is* misleading but not the "opposite" of the truth.

It is important to distinguish between the string representing the variable (which is the argument of vwait) and the variable itself. The fact that a proc calling [vwait] declares global a var of the same name has absolutely no effect. What's more important is that the event handlers that may unlock vwait can only refer globals, since they are defined to run at the global scope.

Hence, here is a proposal for rephrasing:

  Consistently with what happens in event handlers, varName is always interpreted as
global if it isn't qualified with a proper namespace prefix.
dkfplain2009-04-05 00:32:09
Fixed in HEAD
dkfplain2009-04-05 00:32:10
allow_comments - 1
Log in (anonymous is fine) to add a comment.