hi !i just went across a problem that makes me guess that iemguts' [closebang] seems to be relying on creation order to work correctly.
attached are two simple example patches that should write the content of a [text] object to a file on the disk when the patch is closed. both seem to work (as a connected [print] object reports its bang correctly), but only example nr 1 actually writes the file.
the difference is, that in example 1 [closebang] was created as the very first object in the main patch. in the second example [closebang] was created after everything else.
can someone please test it and confirm/falsify ? if this is a bug, can it be corrected, or is that impossible due to PD's patching design ? probably just needs some note in the helpfile ...
best oliver
#N canvas 214 196 450 300 10; #N canvas 0 50 450 300 closebang 0; #X obj 88 99 s \$0-cb; #X obj 88 60 closebang 1; #X obj 155 99 print closebang_test_1; #X connect 1 0 0 0; #X connect 1 0 2 0; #X restore 27 15 pd closebang; #X obj 225 116 text define \$0-cb_1; #X obj 27 71 loadbang; #X obj 27 99 del 100; #X obj 27 209 text set \$0-cb_1 9999; #X obj 27 178 random 1000; #X obj 27 150 until; #X msg 27 123 9; #X obj 225 63 r \$0-cb; #X msg 225 89 write ./cb_1.txt; #X text 137 15 <--- created as the first object; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 5 0 4 0; #X connect 6 0 5 0; #X connect 7 0 6 0; #X connect 8 0 9 0; #X connect 9 0 1 0;
#N canvas 214 196 450 300 10; #X obj 27 71 loadbang; #X obj 27 99 del 100; #X obj 27 150 until; #X msg 27 123 9; #X obj 225 63 r \$0-cb; #N canvas 0 50 450 300 closebang 0; #X obj 88 99 s \$0-cb; #X obj 88 60 closebang 1; #X obj 155 99 print closebang_test_2; #X connect 1 0 0 0; #X connect 1 0 2 0; #X restore 27 15 pd closebang; #X obj 27 178 random 55; #X msg 225 89 write ./cb_2.txt; #X obj 225 115 text define \$0-cb_2; #X text 132 15 <---- creaed after everything else; #X obj 27 208 text set \$0-cb_2 9999; #X obj 265 149 print WRITE; #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 2 0 6 0; #X connect 3 0 2 0; #X connect 4 0 7 0; #X connect 6 0 10 0; #X connect 7 0 8 0; #X connect 7 0 11 0;
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list