--- remote.c.~1.1.1.1.~ 2002-11-20 18:46:03.000000000 +0100 +++ remote.c 2003-01-24 12:34:42.000000000 +0100 @@ -37,12 +37,15 @@ typedef struct _remote { t_object x_obj; + t_symbol *prefix; } t_remote; /* send 'anything' to receiver */ static void remote_anything(t_remote *x, t_symbol *s, int argc, t_atom *argv) { int i; + char mysym[MAXPDSTRING]; + t_symbol *target; t_atom av[MAX_ARG]; /* the 'new' t_atom without first element */ t_int ac = argc - 1; /* the 'new' number of arguments */ @@ -62,13 +65,16 @@ av[i - 1] = argv[i]; /* just copy, don't care about types */ } /* send only argument-part to receivers */ - if (s->s_thing) pd_forwardmess(s->s_thing, argc, argv); + sprintf(mysym,"%s%s", x->prefix->s_name, s->s_name); + target = gensym(mysym); + if (target->s_thing) pd_forwardmess(target->s_thing, argc, argv); } -static void *remote_new(void) +static void *remote_new(t_symbol *s) { t_remote *x = (t_remote *)pd_new(remote_class); - + + x->prefix = s; #ifndef MAXLIB post(version); #endif @@ -78,7 +84,7 @@ void remote_setup(void) { remote_class = class_new(gensym("remote"), (t_newmethod)remote_new, 0, - sizeof(t_remote), 0, 0); + sizeof(t_remote), 0, A_DEFSYM, 0); class_addanything(remote_class, remote_anything); class_sethelpsymbol(remote_class, gensym("maxlib/help-remote.pd")); }