Re: tablelist and unknow

Liste des GroupesRevenir à cl tcl 
Sujet : Re: tablelist and unknow
De : csaba.nemethi (at) *nospam* t-online.de (nemethi)
Groupes : comp.lang.tcl
Date : 06. Oct 2024, 16:51:08
Autres entêtes
Message-ID : <vdublc$2t41$1@tota-refugium.de>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
Am 06.10.24 um 14:32 schrieb clt.to.davebr@dfgh.net:
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
 
The only reason for using args was that the OP used this form with both procs unknown and moveCol.
--
Csaba Nemethi  https://www.nemethi.de  mailto:csaba.nemethi@t-online.de

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