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

Ingo Stock mail at ingostock.de
Sun May 20 18:25:30 CEST 2018


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: create-arrays5.pd
Type: text/x-pd-l2ork
Size: 1833 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180520/523e1e02/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create-arrays7.pd
Type: text/x-pd-l2ork
Size: 1972 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180520/523e1e02/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180520/523e1e02/attachment-0001.sig>


More information about the Pd-list mailing list