|
2010-02-18
| ||
| 09:20 | • Closed ticket [2945212fff]: namespace inscope magic behaviour missing plus 6... artifact: cd2ccfd341 user: sf-robot | |
|
2010-02-03
| ||
| 20:47 | • Pending ticket [2945212fff]. artifact: 430bb1a063 user: msofer | |
| 20:47 | • Ticket [2945212fff]: 4 changes artifact: 5b8e129bb1 user: msofer | |
| 12:13 | • New ticket [2945212fff]. artifact: 890ac62c9d user: jaspertheperson | |
namespace inscope magic behaviour missing
Closed / Invalid2945212fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-02-03 12:13:40
In tcl up to 8.5, a list whose first element is a list starting with "namespace inscope" can be evaluated as if the first element had already been command-substituted, as in this example:
% {namespace inscope :: puts} foo
foo
However this does not happen in 8.6, instead you get:
invalid command name "namespace inscope :: puts"
The earlier behaviour is technically wrong, but widely used when binding with the "namespace code" command. If the new behaviour is considered "right", please reassign this bug report to refer to the old, "wrong" behaviour.
msoferplain2010-02-03 20:47:13
Note that [namespace inscope] "... is not expected to be used directly by programmers; calls to it are generated implicitly when applications use namespace code commands to create callback scripts that the applications then register with, e.g., Tk widgets". The manpage only states that
namespace inscope ::foo $script $x $y $z
is equivalent to
namespace eval ::foo [concat $script [list $x $y $z]]
The documented functionality is still present in 8.6, the pair [ns code]/[ns inscope] and the documented equivalence work properly. Or else there really is a bug somewhere: if you have a script where that malfunctions, please attach it here.
The previous (undocumented) magic is gone as of 2008-08-06. If you still need it, see itcl's ticket http://sourceforge.net/tracker/index.php?func=detail&aid=2040295&group_id=13244&atid=313244 for a small script that restores it in your interp.
msofer Pending ticket [2945212fff].
[History diff]2010-02-03 20:47:14
sf-robotplain2010-02-18 09:20:17
allow_comments - 1 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.