Things like:
option -text -configuremethod [list SetText 1]
method SetText {num option value} {
$win.lbl$num configure -text $value
set options($option) $value
}
wont work. Perhaps the callback should be concatenated
(uplevel) when executed.
snit 1.0
Logged In: YES
user_id=72656
I was thinking about this myself for -validatemethod. I
wanted to be able to allow things like:
option -place -default center -validatemethod [list ListOf
$placeValues]
option -modal -default none -validatemethod [list ListOf
$modalValues]
....
Logged In: YES
user_id=372859
The current behavior is as it is by design; there was considerable discussion
on the Snit mailing list about at the time. I forget the details; you can find
them in the Snit mailing list archives (which you can find via the Snit
home page, http://www.wjduquette.com/snit\).
As for the -validatemethod, it will soon be deprecated; it's being replaced
by a "-type" option. I've got the code written and will be starting on the
documentation updates this week; the new version will be included in
the Tcllib release for this year's Tcl/Tk conference in October.
Logged In: YES
user_id=372859
Note that "option -type" is now available in CVS. As for updating -
configuremethod and -cgetmethod as described here, I'll have to think about it
some more.