[PD-dev] getting the classname in an class

Mathieu Bouchard matju at artengine.ca
Sat Oct 27 20:51:30 CEST 2007


On Sat, 27 Oct 2007, Claude Heiland-Allen wrote:
> Mathieu Bouchard wrote:
>> On Sat, 27 Oct 2007, Claude Heiland-Allen wrote:
>>> See attached external and Pd patch for a solution (workaround?) using an 
>>> A_GIMME constructor, at least with pd-miller-0.40-2...
>> This is because the first argument of the constructor is the same thing as 
>> the first element of the binbuf of the object, as that element is the 
>> selector in the message that is sent to [objectmaker]. So it does like what 
>> our latest solutions do, but because you get it from the constructor, you 
>> can only use it in the constructor or you have to store it. but it's 
>> already stored in the object, as the first element of the binbuf, so...
> Ah, I didn't quite understand what was going on.  Thanks for clarification.

If you understood it now you'd be asking me why is it that even though the 
constructor looks like a anything-method, and that in general it's so much 
like a method in an object, why is it that it doesn't have a self 
argument? I don't know. Miller felt like making a special case for that. 
Deep in the internals you have things like "if (x==&pd_objectmaker) ..."

> (I was going to say requiring non-m_pd.h files was bad, but that's no issue 
> for modifying Pd itself...)

If every external class that has a savefn has to do it, it's not about 
modifying pd itself. besides, apart from iemgui, pd internals don't use 
savefn, they use a big if/else with every special case in it.

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


More information about the Pd-dev mailing list