[info object] can't detect imported objects
Closed / Fixed1963130fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2008-05-13 14:43:02
When a particular type of command is
[namespace import]ed, the import should
identify as the same type as the original
command. For example, procs:
% proc p {} {}
% info procs p
p
% namespace export p
% namespace eval import namespace import ::p
% info procs import::p
::import::p
Another example, ensembles:
% namespace ensemble create -command e
::e
% namespace ensemble exists e
1
% namespace export e
% namespace eval import namespace import ::e
% namespace ensemble exists import::e
1
But, look at objects:
% package require TclOO
0.3a0
% namespace path oo
% object create o
::o
% info object isa object o
1
% namespace export o
% namespace eval import namespace import ::o
% info object isa object import::o
0
Oops!
dkfplain2008-05-13 22:34:04
Logged In: YES user_id=79902 Originator: NO Hmm, it seems that Tcl_GetObjectFromObj isn't doing the traverse (correctly? at all?)
dkfplain2008-05-13 22:35:16
Logged In: YES user_id=79902 Originator: NO It's possible that this might not get fixed while TclOO is outside the core; I can't remember if code can traverse the import "links" without having access to internal structures...
dkfplain2008-05-15 15:53:38
Logged In: YES user_id=79902 Originator: NO I was wrong. There was an API that could do exactly what I needed. :-) Fixed.
Log in (anonymous is fine) to add a comment.