_______________________________________________Pd has the [text] object for entering text, but I think it is not really suitable for your use case, because it is meant for typing Pd lists and therefore treats several characters specially (e.g. semicolons, colons).
If you want interactive editing, I think you need to make your own Tcl GUI object with a plain text editor. If you're a brave Tcl programmer, you could even add syntax highlighting and auto identation ;-)
For inspiration, you could have a look at the [entry] object of the old "flatgui" library, which is basically a widget for plain text.
Christof
On 27.10.2020 15:18, Iain Duncan wrote:
Hi folks, I'm in the design stages of porting my Scheme for Max external to Pd, and have some questions already. :-)
What is the best way to deal with large-ish blocks of text in Pd for sending big text messages to an object? In Max (in case readers know it) I use a textedit object to allow the user to enter several lines of code, this goes to a tosymbol to turn into one giant symbol, and then I use a prepend to get a single message that looks like the below
eval-string "(define (hello-world) (post :hello-world))"
The above then comes into my external as two atoms.
If anyone has suggestions for the best way to do that, or knows of externals I might want to use to accomplish the above, that would be lovely.
iain
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list