[PD] [PD-announce] getpatchname

Jamie Bullock jamie at postlude.co.uk
Thu Jul 13 23:14:14 CEST 2006


On Wed, 12 Jul 2006 20:55:56 -0400 (EDT)
Mathieu Bouchard <matju at artengine.ca> 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 ?
> 

Could you explain what you mean by 'backpointer', Google and Wikipedia aren't throwing up much. I'm just trying to understand why this doesn't work.

TIA,

Jamie




More information about the Pd-list mailing list