From e160cf16985f9b8139b9687e9ba9498104a46d0b Mon Sep 17 00:00:00 2001 From: mescalinum Date: Wed, 16 Sep 2009 00:45:32 +0000 Subject: add loadbang method svn path=/trunk/externals/tclpd/; revision=12360 --- tcl_class.cxx | 7 ++++++- tcl_extras.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) 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); -- cgit v1.2.1