...and [patch_name] external (again pd-l2ork only) that outputs the filepath out of the left outlet and the patch filename out of the right outlet.

On Mar 4, 2014 12:47 PM, "Jonathan Wilkes" <jancsika@yahoo.com> wrote:
On 03/04/2014 03:00 AM, Kaj Ailomaa wrote:

On Tue, Mar 4, 2014, at 02:54 AM, Chris McCormick wrote:
Hello,

On 03/03/14 21:55, Kaj Ailomaa wrote:
Hi. I've been googling a bit and looking through the library of objects
that comes with pd-extended, but can't seem to find a way to get the
name of the patch from within the patch. Anyone know of a nice method to
do this?
I would use [namecanvas] for this. For example you could have an object
like [namecanvas $0-mypatch] and then you can send messages to the patch
using e.g. [s $0-mypatch].

Thanks, but this won't work for me, as the name has to be the actual
patch name.

I've understood that there might be a fix in the svn version of
[canvasname], apart of iemguts, which would allow getting the name of
the top level patch.

The reason I had for this is I wanted to have uniquely named patches
that have a common save mechanism, which looks up the savefile based on
the unique patch name.
I was always going to create these uniquely named patches in another top
level patch, so I can get around this problems by adding an argument for
the patch, which is the same as the patchname, and let the save
mechanism look up the filename that way.

I initially would have wanted the uniquely named patch to be able to be
opened as is, but that's not a major problem.

Currently I think the only way to do this is [filename(---[canvasinfo], which is only in Pd-l2ork.

-Jonathan


_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list




_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list