[PD] bugreport: $0- in subpatch names

Krzysztof Czaja czaja at chopin.edu.pl
Fri Oct 25 09:42:55 CEST 2002


hi David (and the devs),

in case this has not been fixed with yet, and there has been no
major redesign of the g_canvas.c or the $-code, maybe this patch
could be of some help?  Or maybe the canvas_rename() itself
should be given an atom pointer argument, instead of a symbol,
in order to avoid code duplication?

+++ g_canvas.c	Fri Oct 25 09:33:31 2002
@@ -1074,8 +1074,19 @@

  static void canvas_rename_method(t_canvas *x, t_symbol *s, int ac, t_atom *av)
  {
-    if (ac && av->a_type == A_SYMBOL)
-    	canvas_rename(x, av->a_w.w_symbol, 0);
+    if (ac)
+    {
+ 
if (av->a_type == A_SYMBOL)
+ 
     canvas_rename(x, av->a_w.w_symbol, 0);
+ 
else if (av->a_type == A_DOLLSYM && x->gl_owner)
+ 
{
+ 
     t_canvasenvironment *e = canvas_getenv(x->gl_owner);
+ 
     canvas_setcurrent(x->gl_owner);
+    	    canvas_rename(x, realizedollsym(av->a_w.w_symbol,
+ 
				    e->ce_argc, e->ce_argv, 1), 0);
+ 
     canvas_unsetcurrent(x->gl_owner);
+ 
}
+    }
      else canvas_rename(x, gensym("Pd"), 0);
  }

Krzysztof

David McCallum wrote:
...
 >         If you have a $0- in a subpatch name and change the subpatch
 > name after the fact, the subpatch's name (in the titlebar) appears
 > blank. This also prevents any messages being sent to that subpatch by
 > name (like "; pd-$0-subpatch vis 1").





More information about the Pd-list mailing list