From 066a639c0bb28d759c017ab2e00624dfb0a64b3f Mon Sep 17 00:00:00 2001 From: mescalinum Date: Fri, 28 Aug 2009 21:34:18 +0000 Subject: improve errors printouts, and cleanup svn path=/trunk/externals/tclpd/; revision=12132 --- list_change.tcl | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'list_change.tcl') diff --git a/list_change.tcl b/list_change.tcl index 34ffe9a..562d036 100644 --- a/list_change.tcl +++ b/list_change.tcl @@ -1,32 +1,27 @@ source pdlib.tcl pd::class list_change { -# inlet float + # first 'hot' inlet is created by default + + # add 'cold' inlet: + inlet list + outlet list -# outlet float constructor { - if [pd::args] { - set n [pd::arg_int 0] - for {set i 0} {$i < $n} {incr i} { - pd::add_inlet $self float - } - } + #pd::add_inlet $self float + set @curlist {} } 0_list { - set newlist $args - if {$newlist != $@curlist} { - pd::outlet $self 0 list $newlist + if {$args != $@curlist} { + set @curlist $args + 0_bang } - set @curlist $newlist - - pd::outlet $self 1 float [pd::inlet $self 1] } 0_bang { - pd::post "right value is: [pd::inlet $self 1]" + pd::outlet $self 0 list $@curlist } } - -- cgit v1.2.1