<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-&gt;gl_list; g; g = g-&gt;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(&amp;g-&gt;g_pd)-&gt;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(&amp;g-&gt;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-&gt;x_obj.te_xpix, x-&gt;x_obj.te_ypix, pd_class(&amp;z-&gt;g_pd)-&gt;c_name, </FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">                x-&gt;x_width, x-&gt;x_height, x-&gt;x_bgcolour, x-&gt;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-&gt;x_obj.te_xpix, x-&gt;x_obj.te_ypix, (*(t_pd *)x)-&gt;c_name-&gt;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-&gt;x_width, x-&gt;x_height, x-&gt;x_bgcolour, x-&gt;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>