aboutsummaryrefslogtreecommitdiff
path: root/pdlib.tcl
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2011-10-13 23:35:44 +0000
committermescalinum <mescalinum@users.sourceforge.net>2011-10-13 23:35:44 +0000
commit8303218509a59630ec4c3a31aed0b5264e977500 (patch)
tree998978fa7ab2c8a9b43ba8e43978c1c057a21962 /pdlib.tcl
parent60160b4fb3576ba38d901ff18976add29e6cd408 (diff)
some binbuf support. dollar-args still not working properly
svn path=/trunk/externals/loaders/tclpd/; revision=15592
Diffstat (limited to 'pdlib.tcl')
-rw-r--r--pdlib.tcl18
1 files changed, 18 insertions, 0 deletions
diff --git a/pdlib.tcl b/pdlib.tcl
index f490289..4c45cb5 100644
--- a/pdlib.tcl
+++ b/pdlib.tcl
@@ -256,5 +256,23 @@ namespace eval ::pd {
# upload proc
sys_gui "guiproc $name $argz $body\n"
}
+
+ proc get_binbuf {self} {
+ set binbuf [tclpd_get_object_binbuf $self]
+ set len [binbuf_getnatom $binbuf]
+ set result {}
+ for {set i 0} {$i < $len} {incr i} {
+ set atom [tclpd_binbuf_get_atom $binbuf $i]
+ set selector [atom_type_string $atom]
+ set value {?}
+ if {$selector == "float"} {
+ set value [atom_float_value $atom]
+ } elseif {$selector == "symbol"} {
+ set value [atom_symbol_value $atom]
+ }
+ lappend result [list $selector $value]
+ }
+ return $result
+ }
}