[PD] namecanvas: why deprecated?

Matteo Sisti Sette matteo.sistisette at email.it
Fri Feb 9 03:12:58 CET 2007


I'm sure you will show me I'm wrong, but alone I can't see it (that's why I
love this list).

Namecanvas is said to be deprecated (well in the doc it says "obsolete").

Now, when something is deprecated usually there is a replacement: something
better, or newer, or safer, or more elegant, which does the same; while the
concepts of "better", "safer" and "more elegant" are questionable, that of
being able to do all that could be done with the deprecated thing should be
a requirement that can be verified.

As far as I can see, using the names that pd automatically assigns to canvas
DOES NOT replace all the uses of namecanvas.

Suppose that I create an abstraction, say "myabstraction.pd", and I want it
(e.g. when a given input is received) to send itself a message to
dinamically create an object.
I can have a [namecanvas $0something] in it and so the message I would use
would be

[obj etc etc(
[s $0something]

But how can I do this without using namecanvas?


[obj etc etc(
[s pd-myabstraction.pd]

won't do the job, because it will send the message to *every instance* of
myabstraction that exists at that moment, since they have the same name. So
if I have 10 instances, I will create 10 objects in each instance!!
Unless that is what one wants, of course.

In fewer words, the automatically assigned canvas name is not unique to an
instance of an abstraction, while the name assigned with namecanvas can be.

So what is the "replacement" for namecanvas?


More information about the Pd-list mailing list