<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV>Ok, I've seen a number of different ideas for how to get the complete classname an object was instantiated with from within that class, but I haven't been able to get one working.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Krzysztof did this in externals/miXed/cyclone/hammer/universal.c:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier"> t_gobj *g;</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> for (g = glist->gl_list; g; g = g->g_next)</FONT></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Courier">if (pd_class(&g->g_pd)->c_name == cname) /* LATER rethink */</FONT></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Courier"> pd_bang(&g->g_pd);</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I tried this in my code, but got an error:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier"> binbuf_addv(b, "ssiisiiss", gensym("#X"),gensym("obj"),</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> x->x_obj.te_xpix, x->x_obj.te_ypix, pd_class(&z->g_pd)->c_name, </FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> x->x_width, x->x_height, x->x_bgcolour, x->x_fgcolour);</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier"> entry.c:504: error: dereferencing pointer to incomplete type</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I think IOhannes recommended this, but I get the same error:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#000000" face="Courier"><SPAN class="Apple-style-span" style="background-color: transparent;"> binbuf_addv(b, "ssiisiiss", gensym("#X"),gensym("obj"),</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000" face="Courier"><SPAN class="Apple-style-span" style="background-color: transparent;"> x->x_obj.te_xpix, x->x_obj.te_ypix, (*(t_pd *)x)->c_name->s_name, </SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000" face="Courier"><SPAN class="Apple-style-span" style="background-color: transparent;"> x->x_width, x->x_height, x->x_bgcolour, x->x_fgcolour);</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier"> entry.c:504: error: dereferencing pointer to incomplete type</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Any suggestions?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>.hc</DIV><DIV><BR class="khtml-block-placeholder"><DIV><DIV><BR></DIV><DIV>----------------------------------------------------------------------------</DIV><DIV><BR></DIV><DIV>The arc of history bends towards justice. - Dr. Martin Luther King, Jr.</DIV><BR class="Apple-interchange-newline"> </DIV><BR></DIV></BODY></HTML>