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

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed Mar 3 16:20:08 EST 2010


Author: matju
Date: Wed Mar  3 16:20:07 2010
New Revision: 5096

Log:
refix [#see] [gf/mouse_spy]

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Wed Mar  3 16:20:07 2010
@@ -548,11 +548,11 @@
 	t_clock *clock;
 	t_symbol *rcv;
 	t_pd *snd;
-	\constructor (t_symbol *r=0) {
-		rcv=r;
+	\constructor (t_symbol *r=s_empty) {
+		rcv = r==s_empty?0:r;
 		if (rcv) pd_bind((t_pd *)bself,rcv);
 		snd=0;
-		post("+MouseSpyProxy");
+		post("+MouseSpyProxy r=%s rcv=%s",r->s_name,rcv?rcv->s_name:"rien");
 	}
 	~MouseSpyProxy () {post("-MouseSpyProxy");}
 	\decl void anything (...) {
@@ -568,7 +568,7 @@
 	static void bye (void *x) {INIT1
 		post("->bye");
 		clock_free(self->clock);
-		pd_unbind((t_pd *)bself,self->rcv);
+		if (self->rcv) pd_unbind((t_pd *)bself,self->rcv);
 		pd_free((t_pd *)x);
 		post("<-bye");
 	}
@@ -587,7 +587,7 @@
 	BFObject *proxy;
 	\constructor (t_symbol *rcv_=s_default) {post("+MouseSpy");
 		snd = 0;
-		t_atom a[1]; SETSYMBOL(a,rcv_==s_default?symprintf(".x%x",mom):s_empty?0:rcv_);
+		t_atom a[1]; SETSYMBOL(a,rcv_==s_default?symprintf(".x%x",mom):rcv_);
 		pd_anything(&pd_objectmaker,gensym("gf/mouse_spy_proxy"),1,a);
 		proxy = (BFObject *)pd_newest();
 		((MouseSpyProxy *)proxy->self)->snd = (t_pd *)bself;



More information about the Gridflow-cvs mailing list