|
2004-08-27
| ||
| 16:19 | • Closed ticket [1017022fff]: imported ensembles are not recognized plus 7 oth... artifact: bfbeb8ba34 user: dkf | |
|
2004-08-26
| ||
| 16:49 | • New ticket [1017022fff]. artifact: da14460f9f user: dgp | |
imported ensembles are not recognized
Closed / Fixed1017022fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-08-26 16:49:39
% namespace eval foo {
namespace ensemble create -command foo -subcommands bar
namespace export foo
proc bar args {puts bar}
}
% namespace import foo::foo
% foo bar
bar
% namespace ensemble exists foo
0
% namespace ensemble exists foo::foo
1
So [namespace ensemble exists]
recognizes that [foo::foo] is an
ensemble, but it insists that
[foo] is not, even though they are
two names of the same command.
Contrast this with [info proc]:
namespace eval foo {
namespace export bar
proc bar {} {}
}
% namespace import foo::bar
% info procs bar
bar
% info procs foo::bar
::foo::bar
So [proc]-iness is a property that
both original commands and
imported command share, but
[ensemble]-ness is a property that
imported commands lack, while
original commands have. This
seems inconsistent.
dkfplain2004-08-27 16:19:58
Logged In: YES user_id=79902 Fixed.
Log in (anonymous is fine) to add a comment.