View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] XOTcl 2 problem

From: Kulcsár Ferenc <crusader_at_netbsd.hu>
Date: Sat, 9 Jun 2012 10:00:35 +0200

Dear list,

I'm playing with the example codes placed here: http://next-scripting.org/xowiki/getstart but the XOTcl example isn't working as expected.
I have the following error:

./tclsh8.5 proba1.tcl
::g: unable to dispatch method 'parameter' during '::g.parameter'
    ::g ::xotcl::Object->residualargs
    ::Greeter ::xotcl::Class->create
    invoked from within
"Greeter create g -parameter Anna"
    (file "proba1.tcl" line 13)

the code in the proba1.tcl file is:

package require XOTcl

xotcl::Class create Greeter -parameter name
Greeter instproc say_hello {} {
  my instvar name
  puts "Welcome $name!"
}
Greeter instproc say_bye {} {
  my instvar name
  puts "Goodbye $name!"
}

Greeter create g -parameter Anna

g say_hello

The nx version is working well.

Any hints are appreciated.

TIA,

feri

P.s.: The nsf2.0b3 and git versions display the same error.

-- 
Kulcsár Ferenc <crusader_at_netbsd.hu>