[PD] opening $0-subpatch bug?

Frank Barknecht fbar at footils.org
Mon Dec 5 10:39:50 CET 2005


Hallo,
alexandre matheson hat gesagt: // alexandre matheson wrote:

> I am using a subpatch with a $0-name that I want to open with 
> ;pd-$0-name vis 1, but for some reason I get this error message:
> error: pd-$0-name: no such object

Your first mistake here is to not remember the fact: 

 * There is *no* $0 variable in messages!
 
> I tried different things like
> 
> guibang
> |
> [f $0]
> |
> [;pd-$1-name vis 1(
>
> which did not work either, instead the error message was:
> error: pd-$1-name: no such object

And the second mistake is not forget about that fact: 

 * All $-variables have to be at the beginning of a word!

The solution is, to create something like "pd-NUMBER-name" completely,
which you can send into a message box where it is replacing a
$-variable.

Attached patch shows the solution, but maybe you want to try it
yourself first? Hint: [makefilename] is used.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 142 119 579 382 10;
#X obj 94 112 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 90 154 \; pd-$0-name vis 1;
#N canvas 0 22 454 304 1002-name 0;
#X restore 120 210 pd \$0-name;
#X obj 369 99 symbol \$0-name;
#X obj 369 124 makefilename pd-%s;
#X msg 369 147 \; \$1 vis 1;
#X obj 369 78 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 372 279 pack 0 s;
#X obj 424 231 symbol \$0-name;
#X obj 424 256 makefilename pd-%s;
#X obj 424 210 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 372 258 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X msg 372 305 \; \$2 vis \$1;
#X text 115 90 There is NO \$0 in messages!!;
#X text 367 37 These work:;
#X connect 0 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 6 0 3 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 9 0 7 1;
#X connect 10 0 8 0;
#X connect 11 0 7 0;


More information about the Pd-list mailing list