From fac4cb9db5f0587d61e4eec7f789c72230f31c9d Mon Sep 17 00:00:00 2001 From: mescalinum Date: Thu, 13 Oct 2011 22:25:41 +0000 Subject: add binbuf functions + test (not working yet) svn path=/trunk/externals/loaders/tclpd/; revision=15589 --- examples/binbuf-test.tcl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/binbuf-test.tcl (limited to 'examples') diff --git a/examples/binbuf-test.tcl b/examples/binbuf-test.tcl new file mode 100644 index 0000000..a39118f --- /dev/null +++ b/examples/binbuf-test.tcl @@ -0,0 +1,23 @@ +package require Tclpd 0.2.2 +package require TclpdLib 0.17 + +pd::class binbuf-test { + constructor { + pd::add_outlet $self list + } + + destructor { + } + + 0_bang { + set binbuf [tclpd_get_object_binbuf $self] + pd::outlet $self 0 list [list "symbol binbuf" "symbol $binbuf"] + + set len [binbuf_getnatom $binbuf] + pd::outlet $self 0 list [list "symbol len" "symbol $len"] + + #for {set i 0} {$i < $len} {incr i} { + # pd::post $i:[tclpd_binbuf_get_atom $binbuf $i] + #} + } +} -- cgit v1.2.1