Re: tablelist and unknow

Liste des GroupesRevenir à cl tcl 
Sujet : Re: tablelist and unknow
De : clt.to.davebr (at) *nospam* dfgh.net
Groupes : comp.lang.tcl
Date : 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


Date Sujet#  Auteur
5 Oct 24 * tablelist and unknow7Manfred Stelzhammer
5 Oct 24 +* Re: tablelist and unknow5Manfred Stelzhammer
5 Oct 24 i`* Re: tablelist and unknow4Manfred Stelzhammer
6 Oct 24 i `* Re: tablelist and unknow3nemethi
6 Oct 24 i  `* Re: tablelist and unknow2clt.to.davebr
6 Oct 24 i   `- Re: tablelist and unknow1nemethi
6 Oct 24 `- tablelist and unknow1clt.to.davebr

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal