Artifacts Associated With Ticket 959831ffffffffff
Ticket change [c9cda2537e] (rid 122348) by msofer on 2004-05-25 01:44:07:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The manual pages for global and upvar commands do not explain the behaviour when the variable names contain namespace qualifiers. This is not so bad for upvar, as the behaviour is quite intuitive. Not the same for global ... One possibility is to explain global's behaviour, and show that it could be defined as proc global args { if {[info level] < 2} { return } set cmdName [namespace tail [lindex [info level -1] 0]] if {[info procs $cmdName] eq {}} { return } set cmd [list upvar 0] foreach var $args { lappend cmd ::$var [namespace tail $var] } uplevel 1 $cmd return } - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "07. Variables"
- title initialized to: "global.n, upvar.n: qualified varNames?"
- type initialized to: "Bug"
Ticket change [b1735a3072] (rid 98146) by msofer on 2004-05-25 21:11:58:
- closedate changed to: "2004-05-25T14:11:58"
- closer changed to: "msofer"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
Ticket change [5b6bc1b389] (rid 118321) by msofer on 2004-05-25 21:28:47:
- resolution changed to: "None"
- status changed to: "Open"
Ticket change [9b6dc5a22e] (rid 111121) by msofer on 2004-05-25 23:58:43:
- assignee changed to: "jenglish"
- icomment:
Logged In: YES user_id=148712 Attached proposal for global.n; request comments
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [62a8ffc7f2] (rid 92442) by msofer on 2004-05-25 23:58:44:
- icomment:
File Added - 88378: global.n
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "global.n" [022a1e6a78] (rid 119599) by msofer on 2004-05-25 23:58:44.
Ticket change [c3af9d205c] (rid 111707) by jenglish on 2004-05-26 01:29:41:
- icomment:
Logged In: YES user_id=68433 New text looks good, though I'd suggest leaving out the part about "global can be defined in terms of other builtin commands as: [...]". The Tcl equivalent doesn't make things any clearer, since to understand it you first have to understand all the details of [info level], [namespace tail], [upvar], and [uplevel]. (Plus, I'm not sure it's even correct).
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [d5a37a9a38] (rid 123659) by msofer on 2004-05-26 03:16:37:
- assignee changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 global.n fixed; upvar.n not yet ...
- login: "msofer"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- username: "msofer"
Ticket change [588c610c45] (rid 117826) by msofer on 2005-08-28 08:38:57:
- icomment:
Logged In: YES user_id=148712 Moved the [upvar] issue to Bug #1274918, closed the ticket and changed the summary accordingly
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- title changed to: "doc: global and qualified varNames?"
- username: "msofer"
- icomment:
Ticket change [06221cd3b7] (rid 89168) by msofer on 2005-08-28 08:38:58:
- closedate changed to: "2005-08-28T01:38:58"
- closer changed to: "msofer"