[PD] pd + scalars:: bug (fix)

IOhannes m zmoelnig zmoelnig at iem.kug.ac.at
Thu Nov 15 07:16:38 CET 2001


hi miller, hi list !

using pd with the ("experimental") scalar object is painful, especially
if you (like me) are trying to use it in abstractions that are used more
than one time.

the problems are:
1) all scalar-objects (like "set" or "get") add the leading "pd-" per
default. thus you cannot use "namecanvas my_template" within the sub,
since the "set"(...) routines will fail.
the "scalar"-object itself does *not* add the leading "pd-".  so you
have to create objects:
"scalar pd-my_template float X" and "get my_template X" to address the
same template.
i do not think that this is consistent.
it is not possible to use multiple namespaces within a subpatch (with
"namecanvas"), which is ok, but does not help to work around the
inconsistency.

2) when creating a subpatch like "pd my_template" a namespace
"pd-my_template" will be created.
however, this does not work with $args, so "pd $0_template" will create
a namespace like "pd-$0_template" instead of (for instance)
"pd-1001_template"


i considered these as bugs and tried to fix them::
so now the behaviour is as follows:
1) the "scalar"-object does prepend a "pd-" to it's first argument like
the other traversal objects
2) the $args are correctly expanded for the namespace of a subpatch

i fixed the help-files (5.reference/scalar.pd and
7.stuff/data-structures/8.panel.pd) accordingly.

the patch does not fix the instability of the traversal/scalar-objects
!! (so it will keep crashing when used ;-)

since i am going to use this heavily now, i hope that i could make it
into the next release (or something similar, that let's me use multiple
abstractions with templates and drawings on the parent-patch)


mfg.csd.asdf
IOhannes

the patch is attached and (or alternatively the source-code) can be
found on ftp://iem.kug.ac.at/pd/misc/

mfg.cds.sdaf
IOhannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pd-scalar-patch-0.34.3.tgz
Type: application/x-gtar
Size: 3741 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20011115/14d13006/attachment.tgz>


More information about the Pd-list mailing list