Hi, In the attached patch, I try to dynamically create an object (in the example an [s]) by sending a message to the canvas, and I want this object to have a creation argument $1-foo1 or $1-foo2, etc... That is, the creation argument of the object must contain a "$1" that must not be evaluated when creating the object, plus some fixed part and a number that must be evaluated when creating the object. Then I create at the same time a second object that has a creation argument that is just a clean $1 (not evaluated at creation time).
Look at the attached patch and click on the [3( message box. Can anyone tell why the object on the left is created with creation argument \$1-foo3 rather than $1-foo3, while the object on the right is created with creation argument $1 (not \$1)? Shouldn't the two behave the same way? (in my opinion like the one on the right) If I then save the patch and look at it as a text file, I see that the object on the left is saved as \\\$1-foo3 with four slashes!!! If I then open the patch I saved, it looks fine ([s $1-foo3] with no slash) and if I re-save it the 3 extra slashes are eliminated. I have often come across similar situations in which either the dollar argument is evaluated or too many slashes are added, but you can't obtain an unevaluated dollar argument with no slashes (i.e. internally only one slash). If this is by design, I really don't understand it.
#N canvas 66 122 861 433 12; #X obj 509 146 makefilename $%d; #X msg 510 115 1; #X obj 445 313 s pd-test.pd; #X msg 403 256 obj 30 \$2 s \$3-foo\$1; #X obj 446 55 t f f b; #X obj 442 191 pack f f s; #X obj 461 125 * 22; #X obj 442 218 t a a; #X text 462 23 click here; #X msg 480 283 obj 230 \$2 s \$3; #X msg 424 23 3; #X connect 0 0 5 2; #X connect 1 0 0 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 4 2 1 0; #X connect 5 0 7 0; #X connect 6 0 5 1; #X connect 7 0 3 0; #X connect 7 1 9 0; #X connect 9 0 2 0; #X connect 10 0 4 0;
_______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list