[Xotcl] XOTcl 2 problem
Gustaf Neumann
neumann at wu.ac.at
Sun Jun 10 11:54:01 CEST 2012
|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.
>
More information about the Xotcl
mailing list