Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: clt.to.davebr@dfgh.net Newsgroups: comp.lang.tcl Subject: Re: tablelist and unknow Date: Sun, 06 Oct 24 12:32:21 GMT Organization: A noiseless patient Spider Lines: 20 Message-ID: <21517282179411001@llp> References: Injection-Date: Sun, 06 Oct 2024 14:35:26 +0200 (CEST) Injection-Info: dont-email.me; posting-host="4b73736714c8bfe549dcbf04e4915f43"; logging-data="1309666"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NzQetUkoqHSR+ZhWan3Uf" Cancel-Lock: sha1:4Mkg0bcQN6MDMiLzhuIwCKtfvbg= In-Reply-To: Bytes: 1558 >From: nemethi >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