From aa048d93e8fdae5b8152b3c963da02b3cd244274 Mon Sep 17 00:00:00 2001 From: mescalinum Date: Mon, 31 Aug 2009 01:13:12 +0000 Subject: proxyinlet support working and generally everything working fine (in the list_change use case) svn path=/trunk/externals/tclpd/; revision=12153 --- tcl_class.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tcl_class.cxx') diff --git a/tcl_class.cxx b/tcl_class.cxx index 8349f58..d468d04 100644 --- a/tcl_class.cxx +++ b/tcl_class.cxx @@ -22,6 +22,7 @@ t_tcl* tclpd_new(t_symbol *classsym, int ac, t_atom *at) { const char* name = classsym->s_name; t_class* qlass = class_table[string(name)]; t_tcl* self = (t_tcl*)pd_new(qlass); + self->ninlets = 1 /* qlass->c_firstin ??? */; char s[32]; sprintf(s, "pd%06lx", objectSequentialId++); self->self = Tcl_NewStringObj(s, -1); @@ -55,16 +56,19 @@ void tclpd_free(t_tcl *self) { } void tclpd_anything(t_tcl *self, t_symbol *s, int ac, t_atom *at) { + tclpd_inlet_anything(self, 0, s, ac, at); +} + +void tclpd_inlet_anything(t_tcl *self, int inlet, t_symbol *s, int ac, t_atom *at) { /* proxy method */ Tcl_Obj *av[ac+2]; av[0] = self->self; - av[1] = Tcl_NewIntObj(0); // TODO: 0 -> outlet_number + av[1] = Tcl_NewIntObj(inlet); Tcl_AppendToObj(av[1],"_",1); Tcl_AppendToObj(av[1],s->s_name,strlen(s->s_name)); // selector Tcl_IncrRefCount(av[1]); for(int i=0; itarget = x; - proxy->sel = s; + proxy->ninlet = x->ninlets++; inlet_new(&x->o, &proxy->obj.ob_pd, 0, 0); return proxy; } -- cgit v1.2.1