[PD-dev] getting the classname in an class
Hans-Christoph Steiner
hans at eds.org
Sun Oct 28 23:49:15 CET 2007
On Oct 27, 2007, at 2:25 AM, Mathieu Bouchard wrote:
> On Sat, 27 Oct 2007, Hans-Christoph Steiner wrote:
>
>> Duh... thanks. It now compiles and runs, but sadly, this doesn't
>> work:
>> Both of them returned "entry" as the class, even when I loaded
>> with a namespace prefix.
>
> I don't really know how your namespace system works. Do you have
> any field that is set with that prefix? you could lookup -
> >c_externdir->s_name, but it stores only the absolute dirname,
> which is too much.
>
> There's at least one version of the namespace system that was
> putting the prefix in ->c_name because DesireData's class browser
> was broken by such a change, back in devel_0_39 days.
>
> Now that I think of it, you could try:
>
> binbuf_getvec(((t_text *)x)->te_binbuf)[0]->a_w.w_symbol->s_name
>
> or something like that.
>
> _ _ __ ___ _____ ________ _____________ _____________________ ...
> | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
post("classname: %s", binbuf_getvec(((t_text *)x)->te_binbuf)[0]-
>a_w.w_symbol->s_name);
gives me:
entry.c:671: error: request for member 'te_binbuf' in something not a
structure or union
entry.c:671: error: invalid type argument of '->'
.hc
------------------------------------------------------------------------
----
Man has survived hitherto because he was too ignorant to know how to
realize his wishes. Now that he can realize them, he must either
change them, or perish. -William Carlos Williams
More information about the Pd-dev
mailing list