Skip to content
Tcl Source Code View Ticket
Login

View Ticket

namespace path errors in ::oo::InfoObject

Closed / Invalid6f327a1bbf2b95330be583963eb1f79e9835665dCreated 8 years agoUpdated 53 days ago
Descriptionplain2018-12-22 12:06:39
Observed on an Ubuntu 16.04 AMD64

To reproduce:

% namespace exists ::oo::InfoObject
1
% namespace eval ::oo::InfoObject {namespace path}
path does not refer to an object

dzach
dgp Ticket [6f327a1bbf]: 5 changes [History diff]2019-02-01 17:52:21
dkfhtml2019-02-02 07:44:02

This is correct behaviour, as the command ::oo::InfoObject::namespace exists; it implements info object namespace, a documented command. (It takes a single argument, checks that it is an object, and returns the path to the object's state namespace.) If you want to use the global namesapce command in that context, you need to use the qualified form, i.e., ::namespace; this sort of thing is why the exact implementation of how TclOO isn't fully documented and why poking around inside requires care (because you have to be far more exacting than you think at first glance).

If what you were trying to do worked in earlier versions (info object namespace has been there for a long time now!) then that was actually (probably) a command resolution bug that was corrected. Not quite sure what bug.

anonymousplain2019-04-13 15:42:54
You are right, I ment using ::namespace and missed the namespace qualifier, 
but also couldn't make sense of the error message, deceived by the 
un-quoted word 'path'.

Thanks!
serhiy.storchaka Ticket [6f327a1bbf]: 1 change [History diff]2026-10-11 12:46:19
Log in (anonymous is fine) to add a comment.