aboutsummaryrefslogtreecommitdiff
path: root/list_change.tcl
diff options
context:
space:
mode:
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
}
}
-