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

Re: [Xotcl] XOTcl 2 problem

From: Gustaf Neumann <neumann_at_wu.ac.at>
Date: Sun, 10 Jun 2012 11:54:01 +0200

|XOTcl2 is fine, just the example on http://next-scripting.org/xowiki/getstart was wrong.
Instead of

% Greeter create g -parameter|| Anna|

it should read:

|% Greeter create g -||name|| Anna|

Greeter does not have a parameter named "parameter", but
a parameter "name".

Many thanks for reporting the problem back!

All the best
-gustaf neumann


On 09.06.12 10:00, Kulcsár Ferenc wrote:
> 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.
>