Re: tiny improvement of text widget ?



moumou@xxxxxxxxxxxxxxxxxx <moumou@xxxxxxxxxxxxxxxxxx> wrote:
I'm working a lot with text widgets where i am tagging a lot of
characters. I usually put the list of indices (start - stop) in a list
and then a
eval $text tag add $tag $list

Starting with new (yet alpha) Tcl 8.5, you'll be able
to write it so:
$text tag add $tag {*}$list

with tcl up to 8.4, you can probably still speed it up
if you do it like that:
eval [list $text tag add $tag] $list

.



Relevant Pages