[Xotcl] Problem with initialisation

Kristoffer Lawson setok at fishpool.com
Sun Nov 13 11:14:21 CET 2005


This is with XOTcl 1.3.6, but I couldn't find if 1.3.8 fixes it. The  
following code does not appear to work as expected:

package require XOTcl
namespace import xotcl::*


Class A

A instproc init {test} {
     puts "init: $test"
}

A instproc foo {text} {
     puts "foo: $text"
}

A instproc bar {text} {
     puts "bar: $text"
}

A new "on taas" -foo jou -bar blah
A new -foo jou -bar blah "on taas"

The first will work, but the latter will not. The error is:

wrong # args: should be "bar text"
     ::xotcl::__#1 ::A->bar
     ::xotcl::__#1 ::xotcl::Object->configure
     ::A ::xotcl::Class->create
     ::A ::xotcl::Class->new
     invoked from within
"A new -foo jou -bar blah "on taas""
     (file "dashCreateTest.tcl" line 23)

            /  http://www.fishpool.com/~setok/



More information about the Xotcl mailing list