[PD] Escaping/not resolving dollar argts in msgs/objects?

Derek Kwan derek.x.kwan at gmail.com
Mon May 21 12:00:03 CEST 2018

Ingo Stock <mail at ingostock.de> writes:

> On 05/20/2018 02:12 PM, Derek Kwan wrote:
>> As a side note, I don't really particular about this situation right now
>> and don't have a use case as of yet, but it looks like both the $$
>> approach and the tosymbol approach don't work with trying to insert
>> literal "$0, $1, $2" and so on in [text]s the "patching" sort of way via
>> [text insert]? You can enter those literals just fine via the popup Pd
>> text window and those will save just fine, but both the $$ and tosymbol
>> methods via [text insert] yield input that looks to be their escaped
>> \$0, \$1 versions within the popup Pd text window and then when you try
>> to save the contents of that window they get resolved (so $0 goes to 0
>> and $1 yields \\$1: argument number out of range warnings).
> Yes, the escape mechanism seems to be a bit quirky at times. For
> example, in the attached patch create-arrays5.pd, the array names are
> being created the way described above in the thread and put into a
> [text] object, where they occur escaped. The contents of the [text] can
> be saved with the patch. If you create the arrays from the [text] after
> writing to it, the arrays are created fine. But if you reload the patch,
> $0 is escaped in the array objects, although the contents of [text] look
> exactly the same. Maybe a bug, maybe some quirk.
> Anyhow, there is a solution for writing $0 into [text] and easily
> generate objects from there that is robust against saving the [text]
> contents with the patch, using [text fromlist], which is demonstrated in
> the attached patch create-arrays7.pd. :)
> best wishes, ingo
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list

ah, well that answers that hah. thx!

and yeah, i suppose its' a bit quirky given that at least functionally
texts are collections of lists but I suppose these sorts of things fall
more into the "not officially supported" category than not...


Derek Kwan

More information about the Pd-list mailing list