How to get default values to parameters of class object member methods [incr tcl]
- From: Andrew Falanga <af300wsm@xxxxxxxxx>
- Date: Fri, 29 Jun 2007 12:00:15 -0700
Hello again,
Thanks to all for helping fix my simple blunder. Now I've got another
one and I'm not sure if there is a resolution. I've tried a few
different things, but nothing seems to be working. As well all know,
if a proc is to have a default value for a parameter, it's defined
something like this:
proc someproc { { param = foo } } {
# doing lots of important stuff
}
Well, I've tried something similar in my classes but the interpreter
is always complaining about "too many fields in argument specifier " i
= 234 "". This was with something like:
class integers {
variable int
constructor { i } {
set int $i
}
method SetInt { { i = 234 } } {
set int $i
}
}
Is it possible to have methods with default values to their parameters
in class methods?
Andy
.
- Follow-Ups:
- Prev by Date: Re: Passing list as multiple arguments to proc
- Next by Date: Re: Wrapped application directory oddity
- Previous by thread: Nice double ended scale/slider available?
- Next by thread: Re: How to get default values to parameters of class object member methods [incr tcl]
- Index(es):