[Gridflow-cvs] [svn] commit: r4705 - /trunk/src/classes2.cxx

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Nov 2 17:06:52 EST 2009


Author: matju
Date: Mon Nov  2 17:06:52 2009
New Revision: 4705

Log:
[args] sends init-messages directly to left inlet of owner of $0 instead of using its last outlet

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Mon Nov  2 17:06:52 2009
@@ -91,17 +91,20 @@
     while (!x->gl_env) if (!(x = x->gl_owner)) bug("t_canvasenvironment", x);
     return x;
 } 
-\def 0 loadbang () {
-	//t_canvasenvironment *env = canvas_getenv(bself->mom);
-	post("LOADBANG from [args] in %s",canvas_getabstop(bself->mom)->gl_name->s_name);
-}
+\def 0 bang () {post("%s shouldn't bang [args] anymore.",canvas_getabstop(bself->mom)->gl_name->s_name);}
 void outlet_anything2 (t_outlet *o, int argc, t_atom *argv) {
 	if (!argc) outlet_bang(o);
 	else if (argv[0].a_type==A_SYMBOL) outlet_anything(o,argv[0].a_symbol,argc-1,argv+1);
 	else if (argv[0].a_type==A_FLOAT && argc==1) outlet_float(o,argv[0].a_float);
 	else outlet_anything(o,&s_list,argc,argv);
 }
-\def 0 bang () {
+void pd_anything2 (t_pd *o, int argc, t_atom *argv) {
+	if (!argc) pd_bang(o);
+	else if (argv[0].a_type==A_SYMBOL) pd_typedmess(o,argv[0].a_symbol,argc-1,argv+1);
+	else if (argv[0].a_type==A_FLOAT && argc==1) pd_float(o,argv[0].a_float);
+	else pd_typedmess(o,&s_list,argc,argv);
+}
+\def 0 loadbang () {
 	t_canvasenvironment *env = canvas_getenv(bself->mom);
 	int ac = env->ce_argc;
 	t_atom av[ac];
@@ -116,7 +119,10 @@
 		j++;
 		int k=j;
 		for (; j<ac; j++) if (av[j].a_type==A_SYMBOL && av[j].a_symbol==comma) break;
-		outlet_anything2(bself->outlets[sargc],j-k,av+k);
+		//outlet_anything2(bself->outlets[sargc],j-k,av+k);
+		t_text *t = (t_text *)canvas_getabstop(bself->mom);
+		if (!t->te_inlet) RAISE("can't send init-messages, because object has no [inlet]");
+		pd_anything2((t_pd *)t->te_inlet,j-k,av+k);
 	}
 }
 void Args::process_args (int argc, t_atom *argv) {



More information about the Gridflow-cvs mailing list