[PD] unable to type certain characters

Christof Ressi christof.ressi at gmx.at
Tue Jul 26 17:25:10 CEST 2016


thanks for your explanations! now I realize that it's a actually Tcl problem.

> well, it's pretty easy to create this characters: [makefilename %c] to
> the rescue.

I already managed to create those characters as symbols with [list tosymbol]. as long as they don't make their way to the GUI, everything is fine :-). making JSON strings by appending lists and symbols is actually not that much of a hassle.

btw, maybe it's time to document all of the relevant format strings for [makefilename]. just in case Miller is reading this ;-).


> Gesendet: Dienstag, 26. Juli 2016 um 16:17 Uhr
> Von: "IOhannes m zmoelnig" <zmoelnig at iem.at>
> An: "Christof Ressi" <christof.ressi at gmx.at>
> Cc: pd-list at lists.iem.at
> Betreff: Re: [PD] unable to type certain characters
>
> On 2016-07-26 15:50, Christof Ressi wrote:
> >> though of course this is not the real reason why these keys are forbidden.
> > 
> > so what is the real reason?
> > 
> > 
> > to me it feels weird that these three characters (which are omnipresent in most languages)
> 
> this is the reason why they are forbidden: these characters have a
> special meaning in tcl/tk and rather than properly escaping them (and
> going through hell) they are just forbidden (which saves the devs a lot
> of hassle).
> 
> > should be totally forbidden in Pd. right now it seems like I can't build things like regular expressions, java script code or JSON data in a way which isn't totally akward and defeats the purpose of human-readable formats.
> 
> well, those use-cases should be catered for easily enough: just use some
> other characters instead of the forbidden ones, and replace them before
> doing the actual processing.
> e.g. "{" -> "<<" and "}" -> ">>"
> and then run the following json string through
>   `sed -e 's|<<|{|g' -e '|>>|}|g'`:
> ["foo", <<"bar": ["baz", null, 1.0, 2]>>]
> 
> (only to discover that while you can type semicolons in Pd, they are
> treated somewhat special...)
> 
> > 
> > after some more trying I discovered that I can actually safely type '{' and '}' within a [text] window, although I still get the 'keycode dropped' error in the console.
> 
> that's because the [text] window lacks character checker. it probably
> should be there as well.
> 
> > 
> > some questions:
> > 
> > why can I type curly braces in [text] but not in a message box?
> 
> see above.
> 
> > why can I escape a semicolon in [text] but not in a message box?
> 
> because you really cannot.
> (at least not in a way that is much more meaningful than the "keycode
> dropped" on the patch level)
> 
> > 
> > even if there should be a serious technical reason for why a user shall not be able to type these characters in a message box, would it at least be possible to create them dynamically, e.g. with a message similar to 'addsemi', 'addcomma' or 'adddollar'?
> 
> well, it's pretty easy to create this characters: [makefilename %c] to
> the rescue.
> 
> fgasdmr
> IOhannes
> 
> 



More information about the Pd-list mailing list