[Gridflow-cvs] [svn] commit: r4699 - /trunk/src/gridflow.cxx

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Nov 2 16:20:57 EST 2009


Author: matju
Date: Mon Nov  2 16:20:57 2009
New Revision: 4699

Log:
add support for loadbang. (the method has to be explicitly defined, because canvas_loadbang looks it up using getfn)

Modified:
    trunk/src/gridflow.cxx

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Mon Nov  2 16:20:57 2009
@@ -532,6 +532,12 @@
 
 static t_class *BFProxy_class;
 
+static void BFObject_loadbang (BFObject *bself) {
+	FMethod m = funcall_lookup(bself,"_0_loadbang");
+	if (!m) {error("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); return;}
+	m(bself->self,0,0);
+}
+
 static void BFObject_anything (BFObject *bself, int winlet, t_symbol *selector, int ac, t_atom2 *at) {
     try {
 	t_atom2 argv[ac+1];
@@ -748,7 +754,11 @@
 		sizeof(BFObject), CLASS_DEFAULT, A_GIMME,0);
 	fclasses[string(name)] = fclass;
 	fclasses_pd[fclass->bfclass] = fclass;
-	class_addanything(fclass->bfclass,(t_method)BFObject_anything0);
+	t_class *b = fclass->bfclass;
+	class_addanything(b,t_method(BFObject_anything0));
+	FMethod m = funcall_lookup(fclass,"_0_loadbang");
+	//post("class %s loadbang %08x",name,long(m));
+	if (m) class_addmethod(fclass->bfclass,t_method(BFObject_loadbang),gensym("loadbang"),A_NULL);
 }
 
 /* This code handles nested lists because PureData (all versions including 0.40) doesn't do it */



More information about the Gridflow-cvs mailing list