[PD] [PD-announce] getpatchname

Miller Puckette mpuckett at imusic1.ucsd.edu
Wed Jul 12 18:52:17 CEST 2006


HI all,

canvas_getcurrrent() is only valid in the context of teh new() routine...
you can call it there and save the result in the instance structure if you
need to refer back to it (as in this case.)

cheers
Miller

On Wed, Jul 12, 2006 at 05:00:46PM +0100, Jamie Bullock wrote:
> 
> Hi,
> 
> I've just made a new external [getpatchname], which will return the filename of the patch in which it is instantiated. It has been committed to the CVS under externals/postlude, and has been tested under Linux.
> 
> This functionality may well be available somewhere else, in which case I would be intruiged to know how/where - particularly if it can be done without externals.
> 
> Also, the external is currently buggy in the sense that it retains the patch name from the external's instantiation, so if you rename the patch then send a 'bang' message to the object, it will report the 'old' patch name. This is because accessing canvas_getcurrent()->gl_name  from a method call rather than from getpatchname_new results in a segfault. I would be interested to know why this is....
> 
> best,
> 
> Jamie
> 
> _______________________________________________
> PD-announce mailing list
> PD-announce at iem.at
> http://lists.puredata.info/listinfo/pd-announce
> 
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

_______________________________________________
PD-announce mailing list
PD-announce at iem.at
http://lists.puredata.info/listinfo/pd-announce




More information about the Pd-list mailing list