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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to