Sujet : Re: failing to understand/use lambda
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tclDate : 25. Jun 2025, 10:02:09
Autres entêtes
Message-ID : <ygaikkk9otq.fsf@akutech.de>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
* Mark Summerfield <
m.n.summerfield@gmail.com>
| oo::define Store method add {args} {
| puts "action: adding [llength $args] new files"
| $Reporter "adding [llength $args] new files"
| }
--<snip-snip>--
| Actual output:
>
| action: adding 3 new files
| invalid command name "::apply {message { puts "reporter: $message" }}"
Note that I have no experience with lambda(n), but the error message
sounds like you need
{*}$Reporter "adding ..."
when calling the reporter (i.e. expand the command being called).
HTH
R'