aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2011-10-14 22:18:50 +0000
committermescalinum <mescalinum@users.sourceforge.net>2011-10-14 22:18:50 +0000
commit2e927c34a68671d7f090cbfafe70e87cac21375a (patch)
tree27d49d518a2f748a5f6e8467f9313bc742e7adc6
parent9ea4e9fc1b4775a0e6b1c387a2a0965686c1c20e (diff)
add tclpd-interp-info and fix an error
svn path=/trunk/externals/loaders/tclpd/; revision=15601
-rw-r--r--examples/tclpd-interp-info.tcl21
-rw-r--r--pdlib.tcl2
2 files changed, 21 insertions, 2 deletions
diff --git a/examples/tclpd-interp-info.tcl b/examples/tclpd-interp-info.tcl
new file mode 100644
index 0000000..29c1ca8
--- /dev/null
+++ b/examples/tclpd-interp-info.tcl
@@ -0,0 +1,21 @@
+package require Tclpd 0.2.3
+package require TclpdLib 0.19
+
+# utilities for getting informations about tclpd's interpreter
+
+proc tclpd-interp-info::constructor {self} {
+}
+
+proc tclpd-interp-info::0_bang {self} {
+ pd::post "-------- namespaces and procs: -------------"
+ set nss [linsert [namespace children ::] 0 ::]
+ foreach ns $nss {
+ pd::post "<NS> $ns"
+ set procs [info procs ${ns}::*]
+ foreach p $procs {
+ pd::post "<PROC> $p"
+ }
+ }
+}
+
+pd::class tclpd-interp-info
diff --git a/pdlib.tcl b/pdlib.tcl
index faf3f5a..777162d 100644
--- a/pdlib.tcl
+++ b/pdlib.tcl
@@ -129,8 +129,6 @@ namespace eval ::pd {
"
# some dummy function to suppress eventual errors if they are not deifned:
- proc ::${classname}::constructor {self args} {}
- proc ::${classname}::destructor {self} {}
proc ::${classname}::0_loadbang {self} {}
proc ::${classname}::save {self args} {return ""}