[PD] Dealing with blocks of text in Pd

Iain Duncan iainduncanlists at gmail.com
Tue Oct 27 15:46:45 CET 2020


Thanks Christof.

What about tosymbol, is there a Pd equivalent for taking a multi-atom
message and turning it into a single string? or other good way of doing
that?



On Tue, Oct 27, 2020 at 7:40 AM Christof Ressi <info at christofressi.com>
wrote:

> 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 at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20201027/fb6b6536/attachment.html>


More information about the Pd-list mailing list