Hi all, I would like to have some help on an error message that I got recently. The code has been working for about 2 years without giving any error and today it didn't want to start. I have XOTcl 1.6.6 with tcl 8.5.8 on a debian machine.
The error message: wrong # args: should be "init" during '::Sim4 slots'
produced when sourcing this code
Class Sim4 -slots { Attribute file1 Attribute file2 Attribute options Default "" }
Sim4 instproc init {} { my instvar hits ... }
Any help is greatly appreciated.
Thanks Cristian
All, The problem was that, somehow, I managed to change "-d" in -default to "D"... I read several times the code and I didn't see it until now.
Sorry for the noise! Cristian
On 06/09/2010 02:51 PM, Cristian Chaparro wrote:
Hi all, I would like to have some help on an error message that I got recently. The code has been working for about 2 years without giving any error and today it didn't want to start. I have XOTcl 1.6.6 with tcl 8.5.8 on a debian machine.
The error message: wrong # args: should be "init" during '::Sim4 slots'
produced when sourcing this code
Class Sim4 -slots { Attribute file1 Attribute file2 Attribute options Default "" }
Sim4 instproc init {} { my instvar hits ... }
Any help is greatly appreciated.
Thanks Cristian
salut!
Any help is greatly appreciated.
The line
Attribute options Default ""
should read
Attribute options -default ""
why ...
The code has been working for about 2 years without giving any error
i can't explain right now (and i don't have the time to take a closer look), i can only state that it shouldn't have, in the end. without correctly specifying the default value, the string items 'Default ""' are passed to the application-level "constructor", i.e. Sim->init(). as init does not accept any arguments, you run into the error condition reported.
bien à toi
//stefan