[PD-dev] getting the classname in an class

Mathieu Bouchard matju at artengine.ca
Sat Oct 27 08:37:37 CEST 2007


On Sat, 27 Oct 2007, Hans-Christoph Steiner wrote:

>   t_canvas *canvas = (t_canvas*)glist_getcanvas(glist);
>   t_atom *ap = binbuf_getvec(canvas->gl_obj.te_binbuf);
>   t_symbol *s = atom_getsymbol(ap);

ah, you seem to have found the same thing that i just thought about and 
sent you, but you're doing it on the rendering canvas of a canvas.

glist_getcanvas is related to GOP. t_glist and t_canvas are the same 
thing. see the source of glist_getcanvas to see what it does.

i don't know why you wrote the first part of that, but the latter is 
correct. the code in my other mail does that.

in theory it would be better to use atom_getsymbol rather than 
a_w.w_symbol, for future compatibility in case t_atom changes, but so many 
externals use the latter, that it doesn't matter much which one you use.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada


More information about the Pd-dev mailing list