[PD] implementing tooltips WAS: Pd-extended 0.43 updates: lots of new editing features

Mathieu Bouchard matju at artengine.ca
Tue Jul 12 20:57:18 CEST 2011


On Tue, 12 Jul 2011, Jonathan Wilkes wrote:

> Mathieu Bouchard <matju at artengine.ca> wrote:
>> EXTERN int canvas_isabstraction(t_canvas *x);
>> declared in #include "g_canvas.h"
>
> but it takes a t_canvas and I have a t_object.

pd_class(x)==canvas_class ? canvas_isabstraction((t_canvas *)x) : 0;

thus you check whether it makes sense to cast the pointer to t_canvas*, 
and if it does, you call the function, otherwise you know that it's not an 
abstraction.

  _______________________________________________________________________
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC


More information about the Pd-list mailing list