aboutsummaryrefslogtreecommitdiff
path: root/list_change.tcl
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2009-08-28 21:34:18 +0000
committermescalinum <mescalinum@users.sourceforge.net>2009-08-28 21:34:18 +0000
commit066a639c0bb28d759c017ab2e00624dfb0a64b3f (patch)
tree366cc443591df37fdaeec674cb9ce18e9ce366ba /list_change.tcl
parent9545397540a80010def7b2d6028715faf1ec0506 (diff)
improve errors printouts, and cleanup
svn path=/trunk/externals/tclpd/; revision=12132
Diffstat (limited to 'list_change.tcl')
-rw-r--r--list_change.tcl27
1 files changed, 11 insertions, 16 deletions
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
}
}
-