[PD] [PD-announce] getpatchname

Miller Puckette mpuckett at imusic1.ucsd.edu
Thu Jul 13 03:09:22 CEST 2006


The usual reason: my reluctance to add bloat to data structures...

cheers
Miller

On Wed, Jul 12, 2006 at 08:55:56PM -0400, Mathieu Bouchard wrote:
> On Wed, 12 Jul 2006, Miller Puckette wrote:
> 
> >On Wed, Jul 12, 2006 at 05:00:46PM +0100, Jamie Bullock wrote:
> >>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....
> >
> >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.)
> 
> Yes. It seems like every GUI object has such a backpointer in its struct, 
> including msg (Ctrl+2), floatatom (Ctrl+3) and symbolatom (Ctrl+4). Why 
> not make it standard and add it to t_text ?
> 
>  _ _ __ ___ _____ ________ _____________ _____________________ ...
> | Mathieu Bouchard - t?l:+1.514.383.3801 - http://artengine.ca/matju
> | Freelance Digital Arts Engineer, Montr?al QC Canada


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




More information about the Pd-list mailing list