[Xotcl] Filters on classes

MichaelL at frogware.com MichaelL at frogware.com
Mon Nov 15 16:32:47 CET 2004


I'm using XOTcl 1.3.1.

This code:

        Object instproc someFilter {args} {
            puts "self class        = [self class]"
            puts "self called class = [self calledclass]"
            puts "self              = [self]"
            puts "self calledproc   = [self calledproc]"
            puts "args              = $args"
            puts ""
            next
        }

        Class TestA -parameter {{x 0}}
        TestA filter someFilter

        TestA a
        a x
        a x 10

produces this output:

        self class        = ::xotcl::Object
        self called class =
        self              = ::TestA
        self calledproc   = a
        args              =

        self class        = ::xotcl::Object
        self called class = ::xotcl::Class
        self              = ::TestA
        self calledproc   = unknown
        args              = a

        self class        = ::xotcl::Object
        self called class = ::xotcl::Class
        self              = ::TestA
        self calledproc   = create
        args              = a

        self class        = ::xotcl::Object
        self called class = ::xotcl::Class
        self              = ::TestA
        self calledproc   = alloc
        args              = a

        invalid command name "a"

Note that filtering on "TestA a" seems to prevent the creation of an obj 
named "a". Any ideas?



More information about the Xotcl mailing list