diff options
author | mescalinum <mescalinum@users.sourceforge.net> | 2011-10-02 16:42:06 +0000 |
---|---|---|
committer | mescalinum <mescalinum@users.sourceforge.net> | 2011-10-02 16:42:06 +0000 |
commit | 44f29524444a96d9e40a76f48750f17e2fdc2974 (patch) | |
tree | 179e086e72dd64cd130ee493e78d8535a74a76ec /dynreceive.tcl | |
parent | 5a38f01421e93db2cf5b5c05afe84fb73eb89425 (diff) |
reorganize tree following template structure
svn path=/trunk/externals/loaders/tclpd/; revision=15443
Diffstat (limited to 'dynreceive.tcl')
-rw-r--r-- | dynreceive.tcl | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/dynreceive.tcl b/dynreceive.tcl deleted file mode 100644 index 8a269f7..0000000 --- a/dynreceive.tcl +++ /dev/null @@ -1,53 +0,0 @@ -package require Tclpd 0.2.1 -package require TclpdLib 0.17 - -pd::class dynreceive { - constructor { - set @sym {} - if {[pd::args] > 0} { - set @sym [pd::arg 0 symbol] - pd_bind [tclpd_get_instance_pd $self] [gensym $@sym] - } - pd::add_outlet $self - } - - destructor { - # don't forget to call pd_unbind, or sending things to a symbol - # bound to dead object will crash pd! - if {$@sym != {}} { - pd_unbind [tclpd_get_instance_pd $self] [gensym $@sym] - } - } - - 0_set { - # send [set empty( to clear the receive symbol - set s [pd::arg 0 symbol] - if {$@sym != {}} { - pd_unbind [tclpd_get_instance_pd $self] [gensym $@sym] - } - if {$s == {empty}} { - set @sym {} - } else { - set @sym $s - pd_bind [tclpd_get_instance_pd $self] [gensym $@sym] - } - } - - 0_bang { - pd::outlet $self 0 bang - } - - 0_float { - pd::outlet $self 0 float [pd::arg 0 float] - } - - 0_symbol { - pd::outlet $self 0 symbol [gensym [pd::arg 0 symbol]] - } - - 0_anything { - set sel [pd::arg 0 symbol] - set argz [lrange $args 1 end] - pd::outlet $self 0 $sel $argz - } -} |