[PD] message box issue with blank spaces

Frank Barknecht fbar at footils.org
Wed Dec 9 10:19:55 CET 2009


Hallo,
Matteo Sisti Sette hat gesagt: // Matteo Sisti Sette wrote:

> But if I send such a symbol (containing blank spaces, e.g. the output of  
> an openpanel) to the following chain:
>
> ...
> |
> [list prepend set]
> |
> [list trim]
> |
> [ (
>
>
> then the symbol IS truncated at the first space.

This only happens after saving and reloading for me. I attached a patch that
constructs symbols with one and two spaces. As long as you don't save and
reload, the symbols stay intact even in message boxes. After saving and
reloading, they don't - they simply become message boxes containing ordinary
list rsp. meta messages with their elements separated by spaces like everywhere
else in Pd. Pd has no way to let these symbols survive saving, so if you need
them, you have to construct new ones each time. I guess, one could do a feature
request regarding this, but in the end the problem lies deeper and relates to
putting a proper string quoting and escaping mechanism in place.

Ciao
-- 
Frank
-------------- next part --------------
#N canvas 411 326 735 376 10;
#X msg 223 30 32;
#X symbolatom 242 79 24 0 0 1 one_space - -;
#X obj 59 255 list prepend set;
#X obj 59 277 list trim;
#X msg 59 303 left right farright;
#X obj 223 189 makefilename left%cright;
#X obj 223 54 makefilename left%cright%%cfarright;
#X symbolatom 242 216 24 0 0 1 two_spaces - -;
#X obj 64 84 list prepend set;
#X obj 64 106 list trim;
#X msg 64 132 left right%cfarright;
#X msg 223 132 set \$1 \, 32;
#X msg 25 44 bang;
#X text 178 31 click;
#X obj 59 328 symbol;
#X symbolatom 59 350 24 0 0 1 two_spaces_or_no_after_saving - -;
#X obj 340 305 symbol;
#X symbolatom 340 327 24 0 0 1 no_space_after_saving - -;
#X msg 340 280 left right farright;
#X text 25 25 clear;
#X connect 0 0 6 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 14 0;
#X connect 5 0 7 0;
#X connect 5 0 2 0;
#X connect 6 0 1 0;
#X connect 6 0 11 0;
#X connect 6 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 11 0 5 0;
#X connect 12 0 8 0;
#X connect 12 0 2 0;
#X connect 14 0 15 0;
#X connect 16 0 17 0;
#X connect 18 0 16 0;


More information about the Pd-list mailing list