aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2009-09-16 00:45:32 +0000
committermescalinum <mescalinum@users.sourceforge.net>2009-09-16 00:45:32 +0000
commite160cf16985f9b8139b9687e9ba9498104a46d0b (patch)
tree321f69431fc923c3463555e70a04a91d790fd7b3
parent5b7b433329d8bd25fe95e3222cbe2b3148fe64dd (diff)
add loadbang method
svn path=/trunk/externals/tclpd/; revision=12360
-rw-r--r--tcl_class.cxx7
-rw-r--r--tcl_extras.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/tcl_class.cxx b/tcl_class.cxx
index 81d5c98..16c7564 100644
--- a/tcl_class.cxx
+++ b/tcl_class.cxx
@@ -16,7 +16,8 @@ t_class* tclpd_class_new(const char* name, int flags) {
class_table[string(name)] = c;
class_addanything(c, tclpd_anything);
-
+ class_addmethod(c, (t_method)tclpd_loadbang, gensym("loadbang"), A_NULL);
+
// always set save function. it will call the default if
// none exists in tcl space.
class_setsavefn(c, tclpd_save);
@@ -188,6 +189,10 @@ error:
return;
}
+void tclpd_loadbang(t_tcl* x) {
+ tclpd_inlet_anything(x, 0, gensym("loadbang"), 0, NULL);
+}
+
/* Tcl glue: */
t_proxyinlet* tclpd_add_proxyinlet(t_tcl* x) {
diff --git a/tcl_extras.h b/tcl_extras.h
index 3fb3bf7..9c5ee84 100644
--- a/tcl_extras.h
+++ b/tcl_extras.h
@@ -60,6 +60,7 @@ t_tcl* tclpd_new(t_symbol* classsym, int ac, t_atom* at);
void tclpd_free (t_tcl* self);
void tclpd_anything(t_tcl* self, t_symbol* s, int ac, t_atom* at);
void tclpd_inlet_anything(t_tcl *self, int inlet, t_symbol *s, int ac, t_atom *at);
+void tclpd_loadbang(t_tcl* x);
t_proxyinlet* tclpd_add_proxyinlet(t_tcl* x);
t_tcl* tclpd_get_instance(const char* objectSequentialId);
t_pd* tclpd_get_instance_pd(const char* objectSequentialId);