[PD] symbolatom: why does it not allow to type spaces?

Mathieu Bouchard matju at artengine.ca
Tue Dec 11 21:32:11 CET 2007

On Tue, 11 Dec 2007, Roman Haefeli wrote:

> ah, yes i am overseeing. thank you for mentioning them. to be added:
> labels in iemguis, when saved.

I just made this movie of it:


DesireData will save them correctly because it uses the same code for 
sending to the GUI as for writing to a file. It also calls the same method 
for updating properties as is now used by the object creator to load an 
iemgui from a file.

> but these are things that already would break now and it is possible to 
> create symbols containing spaces in pd,

You could call those objects broken and adding this "feature" might amount 
to a bug fix. I don't know who would actually use this bug as a feature, 
but you can bet someone thought it could be a cool way to split a symbol 
into a list. ;)

> it's just not as easy as just using a symbolbox. fact is, that people do 
> it anyway, so why trying to prevent them?

Why? so that the implementation doesn't have to be changed. That way 
no-one has to go back on whatever they have said about pd not being for 
string processing.

> i didn't know that [print] would be affected. in what way is it
> affected? at least visually it doesn't seem to be.

It adds backslashes which are not part of the symbol, because that's 
what's accepted by any version of pd as a way to have spaces within 
symbols. Any version of pd will load such symbols correctly, stripping the 
backslashes (unless you have double-backslashes, of course).

> i encounter that ' ' is treated in a non-comprehensibly special way,
> since other characters such as ';' or ',' are escaped by symbolatom (or
> by pd, i don't know)

Symbolatom incorrectly backslashes those characters when printing them. 
Because it should display a symbol's content as-is, those backslashes 
should have been stripped on the way out. It has the opposite problem of 
[print]. [print] can print any number of atoms of different types, so it 
has to be printed in a way that atom boundaries are clear and that floats 
are distinguishable from symbols, which is why it shares some code with 
the way files are saved, and which is why it shares the same bug.

DesireData's symbolbox works correctly for semicolons commas and spaces, 
but has a bug with {\} characters. This can happen because a symbolbox's 
value is not saved to file, so it has to upload it to the client another 
way than using the save function, and the bug is in that special code.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada

More information about the Pd-list mailing list