Sujet : Re: tablelist and unknow
De : clt.to.davebr (at) *nospam* dfgh.net
Groupes : comp.lang.tclDate : 06. Oct 2024, 13:32:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <21517282179411001@llp>
References : 1 2 3 4
From: nemethi <csaba.nemethi@t-online.de>
3. The above works, but it uses the ::tablelist::moveCol proc, which
belongs to the implementation of the tablelist widget, not to its
documented, public API. It is much better to use something like
>
proc moveCol {args} {
lassign $args tbl sourceCol targetCol
$tbl movecolumn $sourceCol $targetCol
}
>
I'm curious why you suggest using lassign $args... instead of putting the variables in the proc arguments list? Something like:
proc moveCol {tbl sourceCol targetCol} {$tbl movecolumn $sourceCol $targetCol}
Do error messages make more sense that way, or is it more efficient?
daveb