[Xotcl] why Attribute is not imported?

Mykhaylo Sorochan msorc at bigmir.net
Sun Nov 1 01:20:38 CET 2009


Hello,

Why in the following code launched from tclsh I get the error:
invalid command name "Attribute" during '::test1::Test slots'

######
package provide test1 0.1
package require XOTcl

namespace eval ::test1 {
    namespace import ::xotcl::*
    Class Test -slots {
        Attribute name
    }
    namespace export Test
}
namespace import ::test1::*
######

XOTcl 1.6.4, works ok from xotclsh and when 'namespace import ::xotcl::*' 
comes right after 'package require XOTcl' and not within test1 namespace.

Thanks.

-- 
Regards,
Mykhaylo


More information about the Xotcl mailing list