<div dir="ltr">Thank you so much for your explanation Christof.<div>I really hope to be able to type them in Pd one day.<br><div><br></div><div>Regards,</div><div>Zack Lee</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-14 20:43 GMT+09:00 Christof Ressi <span dir="ltr"><<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">it's because these characters are special in Tcl and Pd currently doesn't try to escape them when sending them to the gui. you can still construct those characters on the Pd side (e.g. sending the ascii value to [list tosymbol]) but you can't type them. I also find this very annoying (you can't type JS, Lua or most other code in Pd) but from what I understood those characters are kept reserved because one day they might be turned into a feature (e.g. using {} for nested lists).<br>
 <br>
 <br>
<br>
Gesendet: Montag, 14. Mai 2018 um 13:31 Uhr<br>
Von: "Zack Lee" <<a href="mailto:cuinjune@gmail.com">cuinjune@gmail.com</a>><br>
An: "Miller Puckette" <<a href="mailto:msp@ucsd.edu">msp@ucsd.edu</a>>, "PD List send" <<a href="mailto:pd-list@iem.at">pd-list@iem.at</a>><br>
Betreff: [PD] Reason for not allowing '{' and '}' in Pd?<br>
<div><div class="gmail-h5"><br>
Hi, I'm trying to add a Lua scripting feature for my external which will allow users to write and run Lua scripts directly in pd as object arguments similar to how [expr] object works.<br>
 <br>
But the problem is curly brackets are used for table literals (e.g. a = {1, 2, 3}) in Lua, so it is not possible to create tables using this method.<br>
I could only use '{' and '}' by editing the patch with a text editor, then reopening the patch in Pd.<br>
 <br>
I found this code inside canvas_key() function from "g_editor.c" file.<br>
 <br>
<br>
if (keynum == '\\' || keynum == '{' || keynum == '}')<br>
    {<br>
        post("keycode %d: dropped", (int)keynum);<br>
        return;<br>
    }<br>
 <br>
I would like to know why these 3 characters are not allowed in Pd.<br>
Would there be any problem if we remove the above code from Pd?<br>
Thanks!<br>
 <br>
Best regards,<br>
Zack<br>
 <br>
</div></div> _____________________________<wbr>__________________ <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
</blockquote></div><br></div>