Hi, I created a simple patch that creates & destroys objects by dynamic patching.
But when I send the message "vis 1, editmode 1, mouse 0 0 0 0, cut, vis 0" to a sub patch, suddenly, an error message pops up saying "Error: bad window path name ".x10031fa80.c"
And if I hit 'details' button, it shows the following log.
bad window path name ".x1020113e0.c" bad window path name ".x1020113e0.c" while executing "winfo toplevel $tkcanvas" (procedure "::pdtk_canvas::pdtk_canvas_getscroll" line 2) invoked from within "::pdtk_canvas::pdtk_canvas_getscroll .x1020113e0.c" ("after" script)
I tested this with both Pd-0.47-1 and Pd-0.48-0test7 on Mac OS X 10.11.6. And here's a patch content for anyone who wants to test this error.
#N canvas 654 290 585 488 10; #N canvas 0 23 450 300 sub 0; #X restore 101 395 pd sub; #X obj 224 398 s pd-sub; #X msg 318 332 undo; #X obj 187 15 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 187 108 sel 0 1 2 3; #X msg 375 333 clear; #X msg 74 189 obj 0 0 osc~ 440 , obj 0 20 *~ 0.1 , connect 0 0 1 0 , obj 0 40 dac~ , connect 1 0 2 0 , connect 1 0 2 1; #X msg 230 270 vis 1 , editmode 1 , mouse 0 0 0 0 , cut , vis 0 ; #X obj 187 43 f; #X obj 220 44 + 1; #X obj 187 65 % 4; #X floatatom 187 87 5 0 0 0 - - -, f 5; #X connect 2 0 1 0; #X connect 3 0 8 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 4 2 2 0; #X connect 4 3 5 0; #X connect 5 0 1 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X connect 8 0 9 0; #X connect 8 0 10 0; #X connect 9 0 8 1; #X connect 10 0 11 0; #X connect 11 0 4 0;