Is there any existing way to get canvas names (.x%lx.c) from within Pd?
.hc
------------------------------------------------------------------------ ----
"[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to benefit those who profit from scarcity." -John Gilmore
On Sun, 4 Nov 2007, Hans-Christoph Steiner wrote:
Is there any existing way to get canvas names (.x%lx.c) from within Pd?
I'm pretty sure that you have to write an external for that. Fortunately, it can be simply a few lines, if it's only going to look up its own parent. You have to remember the parent using getcurrentcanvas in the constructor, then output that value when banged. You can store it either as a t_canvas* or directly the resulting t_symbol* or t_atom, but the former is more versatile, as you could add extra methods to get extra variants, such as just .x%lx for example.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
On Nov 6, 2007, at 4:09 AM, Jamie Bullock wrote:
On Sun, 2007-11-04 at 17:13 -0500, Hans-Christoph Steiner wrote:
Is there any existing way to get canvas names (.x%lx.c) from within Pd?
In CVS:
postlude/getpatchname
Is this what you mean?
That's the file name, I mean the Tcl canvas name, which is made by sticking the t_canvas pointer into this printf pattern: .x%lx.c
.hc
------------------------------------------------------------------------ ----
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli