Thank you so much for your explanation Christof. I really hope to be able to type them in Pd one day.
Regards, Zack Lee 2018-05-14 20:43 GMT+09:00 Christof Ressi <[email protected]>: > 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). > > > > Gesendet: Montag, 14. Mai 2018 um 13:31 Uhr > Von: "Zack Lee" <[email protected]> > An: "Miller Puckette" <[email protected]>, "PD List send" <[email protected]> > Betreff: [PD] Reason for not allowing '{' and '}' in Pd? > > 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. > > 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. > I could only use '{' and '}' by editing the patch with a text editor, then > reopening the patch in Pd. > > I found this code inside canvas_key() function from "g_editor.c" file. > > > if (keynum == '\\' || keynum == '{' || keynum == '}') > { > post("keycode %d: dropped", (int)keynum); > return; > } > > I would like to know why these 3 characters are not allowed in Pd. > Would there be any problem if we remove the above code from Pd? > Thanks! > > Best regards, > Zack > > _______________________________________________ [email protected] > mailing list UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list >
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
