[Xotcl] [Fwd: Bug with namespace'd Class?]

Damon Courtney damon-xotcl at tclhome.com
Tue Nov 2 20:22:53 CET 2004


    Why does this not work?

package require XOTcl

::xotcl::Class Foo

Foo instproc bar {} {
    puts "SELF = [self]"
}

Foo foo
% Foo foo
::foo
% foo bar
invalid command name "self"


    But, if I "namespace import ::xotcl::*" and make the class with just
the Class command (not ::xotcl::Class), it works.

    Any ideas?

D

PS:  Windows, Tcl 8.4.3, XOTcl 1.3.1



More information about the Xotcl mailing list