|
From: Joe E. <jen...@fl...> - 2004-08-30 19:24:35
|
In the latest change to scrollbar.tcl (r1.12 -> 1.13):
proc tile::scrollbar::Scroll {w n units} {
set cmd [$w cget -command]
- if {$cmd ne ""} {
- uplevel #0 "$cmd scroll $n $units"
- }
+ if {[llength $cmd]} {
+ uplevel #0 [concat $cmd scroll $n $units]
+ }
}
This forces the -command option to be a list ([llength $cmd]),
but still treats it as a string ([concat] instead of [linsert _ end ...])
The new formulation may have a small performance boost in
the common case where the -command is a pure list, but
it's not fully backwards-compatible, since there are
valid script prefixes that aren't lists.
We had discussed earlier interpreting callback options
that append arguments as command prefixes instead of script
prefixes; is this something we want to do? (Callback options
that don't append arguments would still be interpreted as
scripts.) Personally, I think it's a good idea, but there
are backwards-compatibility issues.
--Joe English
jen...@fl...
|