Re: add additional subcommand for the "chan" tcl command?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: add additional subcommand for the "chan" tcl command?
De : aotto1968 (at) *nospam* t-online.de (aotto1968)
Groupes : comp.lang.tcl
Date : 17. Jun 2024, 20:39:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v4q3dj$sq8k$2@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 17.06.24 16:11, Schelte wrote:
chan exists stdin
question: is this possible with an additional level?
proc chanexists {fd} {
     return [expr {$fd in [chan names]}]
}
namespace ensemble configure chan -map [dict replace \
   [namespace ensemble configure chan -map] exists ::chanexists]
#chan help
puts [chan exists stdin] ; # → OK
# problem: "ensemble" is an ensemble IN the "namespace" ensemble
# goal: namespace ensemble add ENSEMBLE NAME CMD
proc ::namespace_ensemble_add {ensb name cmd} {
   namespace ensemble configure $ensb -map [dict replace \
     [namespace ensemble configure $ensb -map] $name $cmd]
}
→ how I do this for a *two* level ensemble (ensemble in a ensemble) ?

Date Sujet#  Auteur
17 Jun 24 * add additional subcommand for the "chan" tcl command?5aotto1968
17 Jun 24 `* Re: add additional subcommand for the "chan" tcl command?4Schelte
17 Jun 24  +- Re: add additional subcommand for the "chan" tcl command?1aotto1968
17 Jun 24  `* Re: add additional subcommand for the "chan" tcl command?2aotto1968
18 Jun 24   `- Re: add additional subcommand for the "chan" tcl command?1aotto1968

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal